> -----Original Message-----
> From: Henrik Nordstrom [mailto:hno@squid-cache.org]
> Sent: Wednesday, April 03, 2002 7:27 PM
> Issues:
>
> a) We need to clean up not only filedescriptors but also drop root
> privileges etc before starting the child.. with vfork this can only
> be done with a intermediary helper.. exec to intermediarey helper who
> cleans up things and then execs the real thing.
Good point.... But don't we drop root before starting the real squid
anyway? If so, then surely this isn't an issue.
> b) Some UNIX:es have given up on providing a correct vfork() and have
> it identical to fork(), making it somewhat counter-productive to
> spend time today on making correct use of vfork().
If they have a really efficient fork(), then do we care? :].
> c) Things crash an burn if the child receives a signal between
> vfork() and execve().
Why would a child receive a signal? (Other than sigsegv or something
similar, which will make anything crash and burn).
> d) There is no directly clean way to handle a failed execve() when
> vfork() is used.
What about the return code from _exit() ? That's then seen by the parent
in the wait() call.
> Remains to see if we even can use posix_spawn for Squid (haven't
> actually read about it yet, but preleminary it looks good..)
It's very nice. A quote:
"To achieve its coverage goals, posix_spawn( ) and posix_spawnp( ) have
control of six types of inheritance: file descriptors, process group ID,
user and group ID, signal mask, scheduling, and whether each signal
ignored in the parent will remain ignored in the child, or be reset to
its default action in the child."
> For now we will stick to plain fork().
Not an issue for me.
Rob
Received on Wed Apr 03 2002 - 02:43:19 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:57 MST