shrc Shore::getcwd(char *buf, int bufsize);
writes the path name of the current process' working directory
into the buffer given by
characters are copied. The resulting string is null-terminated only if the
length of the returned string is less than that of the buffer.
Shore applications have two working directories: the Unix directory and the
Shore directory. This function returns the latter. The former can be
Note also that some Unix versions will allocate a buffer if the
parameter is 0. This method does not allocate a buffer.
The current working directory of a process can be changed with chdir(oc)
(to change the Shore working directory) or chdir(2) (to change the Unix
is implemented by tracing a path from the current directory back to the
root of the Shore file system.
In the Shore, this operation acquires
short-term SH-mode (share-mode) locks on each directory on this
This manual page applies to Version 1.1.1 of the Shore software.
The Shore project is sponsored by the Advanced Research Project Agency, ARPA
order number 018 (formerly 8230), monitored by the U.S. Army Research
Laboratory under contract DAAB07-91-C-Q518.
Copyright © 1994, 1995, 1996, 1997,
Computer Sciences Department, University of
Wisconsin -- Madison. All Rights Reserved.