TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: BOB STOUT
from: JONATHAN DE BOYNE POLLARD
date: 1998-03-12 10:15:00
subject: CALLING DOS COMMANDS

 BS> The spawn family of calls are unique to PC-based single-tasking
 BS> operting systems, although they're also present in Win32 and OS/2
 BS> systems for backwards code compatibility. 
Actually they aren't.  They are in Win32 and OS/2 compiler libraries because 
they exactly match the paradigms used by the underlying operating system API. 
 Both Win32 and OS/2 support the notion of creating a process from a named 
file, and neither support the notion of creating a process by duplicating an 
already running process.  
There are really two competing paradigms here: POSIX on the one hand with 
fork/exec, and OS/2, DOS, Win32, and VMS on the other with spawn.  spawn() is 
of course easy to emulate on a fork/exec system, whereas emulating fork/exec 
on a spawn model system is not, but the majority seems to be going with the 
spawn model these days.
And this is partially because the POSIX fork/exec paradigm has run into 
trouble with the advent of multiple threads.  There is no consensus as to 
whether fork should duplicate all threads from the current process, including 
all locks held by them, or just the one.  Good reasons can be found for both 
mechanisms.  The spawn paradigm used by OS/2 and Win32 doesn't founder on the 
rocks of multithreading like fork/exec does, simply because the problem 
doesn't apply.  
 ¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)

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™.