Frank Adam wrote in a message to Bryan Joyce:
>> What's the difference between exec and spawn? They both seem to do the
>> same thing.
BS> exec() is part of the Posix.1 standard, spawn() is DOS/Win-only.
[To Bob]
Isn't there a more essential difference ? Namely that exec() overlays the
current program and therefore never returns, while spawn() may be used in
that way but also so that it returns. At least that's the way it's
implemented by Watcom and Borland.
FA> Spawn() also returns the child's exit code, exec() only returns the
FA> OS's success or failure of executing it.
Since exec() never returns on success, it would seem pretty difficult to me
for it to return any status whatsoever upon successful execution.
greetings,
Tom
tomtorfs@village.uunet.be
--- timEd/2 1.10+
---------------
* Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516)
|