michael@x054:[/data/prj/postgresql-8.4.2/src]grep cwd */*.c
Well, unless you redefine it...
port/exec.c:#define getcwd(cwd,len) GetCurrentDirectory(len, cwd)
port/exec.c: char cwd[MAXPGPATH],
port/exec.c: if (!getcwd(cwd, MAXPGPATH))
port/exec.c: join_path_components(retpath, cwd, argv0);
port/exec.c: join_path_components(retpath, cwd, argv0);
port/exec.c: join_path_components(retpath, cwd,
test_path);
port/exec.c: * getcwd() to figure out where the heck we're at.
port/exec.c: * getcwd() to give us an accurate, symlink-free path.
port/exec.c: if (!getcwd(orig_wd, MAXPGPATH))
port/exec.c: if (!getcwd(path, MAXPGPATH))
Now I have no idea what is being called. I hope you do.
On Thu, Jan 7, 2010 at 3:57 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Michael Felt <mamfelt@gmail.com> writes:
> > On Thu, Jan 7, 2010 at 3:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Well, the problem is what to print? The failure we are trying to report
> >> is exactly that we *can't get* the name of the directory.
>
> > Well, there is an argument that a system call is using to get somewhere?
>
> getcwd() has no input parameters.
>
> regards, tom lane
>