nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] vfork()


From: David Levine
Subject: Re: [Nmh-workers] vfork()
Date: Sun, 25 Dec 2011 11:12:03 -0500

Lyndon wrote:

> We don't do any vfork() without an immediately following exec*()
> call, do we?

>From vmh.c:

#ifdef  hpux
    switch (PEERpid = fork ()) {
    /*
     * Calling vfork() and then another routine [like close()] before
     * an exec() messes up the stack frame, causing crib death.
     * Use fork() instead.
     */
#else   /* not hpux */
    switch (PEERpid = vfork ()) {
#endif  /* not hpux */

I'll fork (:-) a separate thread on vmh and other unused files.

makedir.c calls setgid() and setuid() between vfork() and an exec*().

showfile.c calls strcmp().

mhbuildsbr.c calls close() and conditionally dup2() and fileno().

mhlsbr.c calls those plus snprintf() and sigaction() or signal().

With that, I won't look further.  I agree that vfork() should be
globally replaced with fork().

David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]