Re: win2k, service, pg_ctl, popen, etc - Mailing list pgsql-hackers-win32

From Claudio Natoli
Subject Re: win2k, service, pg_ctl, popen, etc
Date
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F514@harris.memetrics.local
Whole thread Raw
In response to win2k, service, pg_ctl, popen, etc  ("Magnus Hagander" <mha@sollentuna.net>)
Responses Re: win2k, service, pg_ctl, popen, etc
Re: win2k, service, pg_ctl, popen, etc
List 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.

Sure, the functions also make certain that the version is as expected, but
to my mind this is just a safety check to make sure the hoops we just jumped
through were all in order. Of course, we'd also lose the ability to protect
people who mix versions in the same directory, but such people need a lot
more protection from themselves than we can provide. ;-)

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

Cheers,
Claudio

---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

pgsql-hackers-win32 by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: FAT or NTFS on W2k
Next
From: "Magnus Hagander"
Date:
Subject: Re: win2k, service, pg_ctl, popen, etc