win2k, service, pg_ctl, popen, etc

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема win2k, service, pg_ctl, popen, etc
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE1716D9@algol.sollentuna.se
обсуждение исходный текст
Ответы Re: win2k, service, pg_ctl, popen, etc  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers-win32
Hi!

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
environment dependent...

Thoughts?

//Magnus


В списке pgsql-hackers-win32 по дате отправления:

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: psql_service v0.11
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: win2k, service, pg_ctl, popen, etc