[Top][All Lists]

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

Re: [] Adding code for fork/vfork?

From: Bob Friesenhahn
Subject: Re: [] Adding code for fork/vfork?
Date: Fri, 15 Apr 2011 20:54:28 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Fri, 15 Apr 2011, Mike Frysinger wrote:

The sole purpose of vfork is to immediately invoke exec()  Any other
purpose is forbidden.  In what case would an exit even be required?

ignoring the fact that Linux allows many many more things to safely happen in
the child of a vfork, what exactly are you supposed to do when that exec fails
and returns ?  or you pray it never does ?

Apparently I would pray. Of course exec could fail and it is then necessary to invoke _exit(2).

This was a temporary brain malfunction on my part.  All better now.

Regardless, using posix_spawn() or posix_spawnp() is a better solution now if one does not need the full-fledged fork().

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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