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

Joerg Schilling js at cs.tu-berlin.de
Mon Nov 9 03:37:56 EST 2009


In article <7llbk1F3eetdpU1 at mid.individual.net>,
Bill Gunshannon <billg999 at cs.uofs.edu> wrote:

>Then, what exactly is the reason VMS can't do a Unix style fork()?

It would help a lot already if vfork() on VMS did work like vfork()
and did not share file descriptors between parent and child.

More then 90% of all calls to fork() do this with the intention to 
call exec*() soon, but many of these calls like to redirect I/O
for the new process. 

With a real vfork() you may use vfork() in all these cases as long as
you do not use stdio in the child and as long as you call _exit() 
instead of exit() in the child in case if a problem. On VMS, you would
need to dup2() descriptors 0/1/2 to other numbers before redirecting 
0/1/2 for the new process _and_ you would need to restore 0/1/2 in the 
parent. The latter makes it hard to suport I/O redirection in typical 
software.

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