Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!mcvax!unido!pcsbst!jh From: jh@pcsbst.UUCP Newsgroups: comp.unix.wizards Subject: Re: Combined fork/exec - (nf) Message-ID: <4300001@pcsbst.UUCP> Date: Mon, 5-Oct-87 13:57:00 EDT Article-I.D.: pcsbst.4300001 Posted: Mon Oct 5 13:57:00 1987 Date-Received: Sat, 10-Oct-87 05:56:28 EDT References: <9424@brl-adm.UUCP> Lines: 15 Nf-ID: #R:brl-adm:-942400:pcsbst:4300001:000:625 Nf-From: pcsbst!jh Oct 5 18:57:00 1987 We did a forkexecve() implementation here at PCS a long time ago. We used the execve() parameters and succeded in combining the semantics of fork() and execve(). This was a not big job. The complicated thing was to modify the sh to use this system call instead of fork() and execve(), because it sometimes does a lot of things inbetween the fork() and the execve() which actually may be done before the fork. A proper use of the "close-on-exec" flag helps. Sometimes, however, the fork() can (and should) not be eliminated because the shell executes a shell script and does no execve(). Johannes Heuft unido!pcsbst!jh