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

Bill Gunshannon billg999 at cs.uofs.edu
Mon Nov 9 15:58:29 EST 2009


In article <00A944D0.32BE9C1D at sendspamhere.org>,
	VAXman-  @SendSpamHere.ORG writes:
> In article <oNmdnU_-cdwT3WXXnZ2dnUVZ_t6dnZ2d at giganews.com>, "Richard B. Gilbert" <rgilbert88 at comcast.net> writes:
>>Joerg Schilling wrote:
>>> 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.
>>> 
>>
>>Learn to live with it.  VMS doesn't have fork() or vfork() because it 
>>works without either one.  VMS has been in use for about thirty years 
>>now without fork().  I learned to program without fork() on IBM 
>>System/360, moved to H-P 2100 series without fork() and then to VAX/VMS 
>>still without fork().  I even managed to write a few programs for 
>>Silicon Graphics IRIX without using fork.
> 
> Exactly!  That's why the effort is called "porting" and not "compiling and
> linking".  If there is something that doesn't exist to support the feature,
> the person "porting" the code needs to redesign/recode that portion of code.
> The end results should be the same.  Get the fork out of there and rewrite
> the code to work with some other scheme supported in the OS.
 
OK, let me know when you have done that with Open Office for VMS.  

bill

-- 
Bill Gunshannon          |  de-moc-ra-cy (di mok' ra see) n.  Three wolves
billg999 at cs.scranton.edu |  and a sheep voting on what's for dinner.
University of Scranton   |
Scranton, Pennsylvania   |         #include <std.disclaimer.h>   



More information about the Info-vax mailing list