[Info-vax] Looking into C-include files on VMS

Joerg Schilling js at cs.tu-berlin.de
Thu Oct 29 10:13:36 EDT 2009


In article <Yt5x2E2PT0yv at eisner.encompasserve.org>,
Bob Koehler <koehler at eisner.nospam.encompasserve.org> wrote:
>In article <7krs6vF3af5v3U10 at mid.individual.net>, Bob Eager <rde42 at spamcop.net> writes:
>> 
>> You miss the point. They are talking about VMS SPAWN, which is unlike 
>> vfork()+exec(). It is nearer to creating a new (empty) process and 
>> loading a program into it.
>
>   Doesn't that end up with the same thing?  I would expect vfork() to
>   start a new process and exec() to load a new program into it.

vfork() creates a new process by just copying CPU registers and MMU tables.
exec() fills the new process with a new process image.

>   In fact, the C RTL does have a pair of routines (or macros in the
>   approriate header file) called vfork() and exec() that end up spawning 
>   a new process running a new program.  Just don't expect the 
>   implementation to look like those in UNIX.

As long as the underlying OS interface is based on C and supports 
main(argc, argv) it should work without special tricks. Note that MS e.g. has
a command line string in the underlying syscall and uses an algorithm for 
creating argv, that has no true inverse.




-- 
EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
      js at cs.tu-berlin.de		(uni)  
      joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily



More information about the Info-vax mailing list