Been trying to find out why things don't work well on Windows 2000. The
closest I've come to a solution is that popen() does not work on windows
2000 *when running as a service*. This isused in find_other_exec(),
which is what pg_ctl uses to find postmaster.exe. It does appear to work
fine on XP and 2003. Haven't tested NT4.
The symptoms are popen() returning NULL, with both errno and
GetLastError() set to 0.
Anyone know *why* this doesn't work?
If we don't know why, sign one more down as a bug in mingw (hardly
surprising - just the area of pipes and consoles seems to be where it's
weak). In that case, why not just recode pg_ctl to execute
postmaster.exe from the same directory it found pg_ctl.exe in. This can
easily be done using GetModuleFileName(). Is a pipe opened at any other
place? Or does other places need to be fixed as well (I haven't gone
through the whole code).
Oh, and also - has *anybody* got the service running wit hpg_ctl as
service wrapper on windows 2000? In that case, it's version or
pgsql-hackers-win32 by date
|Next:||From: Magnus Hagander||Date: 2004-07-20 20:53:41|
|Subject: Re: win2k, service, pg_ctl, popen, etc|
|Previous:||From: Bruce Momjian||Date: 2004-07-20 18:36:14|
|Subject: Re: [HACKERS] Cannot initdb in cvs tip|