Re: BUG #5267: initdb fails on AIX: could not identify current directory

From: Michael Felt <mamfelt(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5267: initdb fails on AIX: could not identify current directory
Date: 2010-01-07 15:00:55
Message-ID: 9ade2d511001070700p50b93415xd3b506b3b2892050@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

michael(at)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(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Michael Felt <mamfelt(at)gmail(dot)com> writes:
> > On Thu, Jan 7, 2010 at 3:35 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-01-07 15:02:49 Re: Concurrent update failure in HEAD
Previous Message Tom Lane 2010-01-07 14:57:15 Re: BUG #5267: initdb fails on AIX: could not identify current directory