Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2001 00:31:35 +0100 (BST)
From:      Richard Tobin <richard@cogsci.ed.ac.uk>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>, David Hill <djhill@novagate.net>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: system and (v)fork
Message-ID:  <200107042331.AAA12531@banks.cogsci.ed.ac.uk>
In-Reply-To: Peter Jeremy's message of Thu, 05 Jul 2001 08:17:03 %2B1000

next in thread | raw e-mail | index | archive | help
> vfork(2) [...] The child code
> between the fork() and subsequent exec() must be carefully written
> because any changes to memory (including stack) or open files will
> also be reflected in the parent.

Not open files: indeed, the main thing you typically want to do before
the exec() is opening, closing and duping files.  Stdio FILE
structures on the other hand are just like any other memory, so you
probably don't want to touch them (hence the warning in the man page
to use _exit() rather than exit()).

-- Richard


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107042331.AAA12531>