Re: win2k, service, pg_ctl, popen, etc

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: win2k, service, pg_ctl, popen, etc
Date: 2004-07-21 11:05:19
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE34BECE@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

> > 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).
>
> Moreover, all the find_*_exec calls could (and IMHO, should)
> make use of GetModuleFileName. Win32 has an API to find the
> running file name; *nix does not and so we have to jump
> through a few hoops. I just don't see the sense in jumping
> through the same hoops under Win32.

mmm, I agree. I think the talk back then was "if it works, do it the
same way on Unix". In this case it clearly does not work. If we need to
do a workaround, this sounds like the correct fix - rather than just
patching a method that's made for a different platform.

> Does there continue to be any resistance to this approach? If
> not, I'll gladly provide a patch.

None from me at least :-)

//Magnus

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Andrew Dunstan 2004-07-21 12:26:31 Re: win2k, service, pg_ctl, popen, etc
Previous Message Claudio Natoli 2004-07-21 08:23:46 Re: win2k, service, pg_ctl, popen, etc