TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRANK ADAM
from: TOM TORFS
date: 1998-02-13 13:46:00
subject: calling dos commands

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.