Bruce Momjian <maillist@candle.pha.pa.us> writes:
>> Regarding the old code (6.3.2), there have been a lot of change in
>> DoBackend/DoExec. I really need some expert advice on what to do.
> I recommend you get anonymous cvs access(see cvs faq on web site) do a
> log to show changes to postgres.c and postmaster.c, and you will find
> the exec was removed in one or two big patches. Then do a cvs diff and
> see the changes made, and try and merge them into the current code with
> ifdef's.
He's right though: there have been subsequent changes that depend on
not doing an exec(). Offhand I only recall MyCancelKey --- that is set
in the postmaster process just before fork(), and the backend simply
assumes that it's got the right value.
The straightforward solution (invent another backend command line switch
to pass the cancel key) would not be a very good idea, since that would
expose the cancel key to prying eyes.
If BeOS does not have the ability to support fork without exec, does it
have some other way of achieving the same result? Threads maybe?
(But Postgres is hardly the only common daemon that uses fork without
exec; sendmail comes to mind, for example. So it seems like the real
answer is to beat up the BeOS folks about fixing their inadequate Unix
support...)
regards, tom lane