Date: Tue, 3 Jul 2001 22:50:18 -0700 From: Gregory Neil Shapiro <gshapiro@FreeBSD.ORG> To: David Hill <djhill@novagate.net> Cc: freebsd-current@FreeBSD.ORG Subject: Re: system and (v)fork Message-ID: <15170.44698.988817.714880@horsey.gshapiro.net> In-Reply-To: <20010704014703.4ec62b5f.djhill@novagate.net> References: <20010704014703.4ec62b5f.djhill@novagate.net>
next in thread | previous in thread | raw e-mail | index | archive | help
djhill> Reading Advanced Programming in the UNIX Environment by Richard djhill> W. Stevens, I see that he says that vfork() should be used instead djhill> of fork() when you just need to use one of the exec() functions, djhill> since it doesn't need to fully copy the address space. djhill> Later in the book, he has an example system() which uses fork() to djhill> run /bin/sh -c via the execl() function. djhill> Why wouldn't he use vfork() instead of fork()? If there is anything that modifies memory or file descripts between the fork() and exec*() call, you can't use vfork(). 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?15170.44698.988817.714880>