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

John E. Malmberg wb8tyw at qsl.network
Thu Nov 5 09:37:42 EST 2009


Joerg Schilling wrote:
> In article <7ld3naF3d1kahU4 at mid.individual.net>,
> Bill Gunshannon <billg999 at cs.uofs.edu> wrote:
> 
>>> I do think this is one place where Unix goofed.  It is an interesting
>>> model, but in practice it is strange.  As it is rare that you want
>>> to share the variables and open files, and most common to exec(),
>>> vfork() was added.  
>> If that were the case then VMS's lack of a true fork() would not be
>> a problem.  But a lot of Open Source (and old Unix software before
>> the Open Source world tried to claim they invented free software)
>> does, in fact, utilize these features.
> 
> From the autoconf tests, it seems that the vfork() implementation
> on VMS is not a true vfork() either. I was however able to call
> POSIX commands via vfork()/execl() and BTW: I now have a working "smake".
> The GNU make binary I found on "EISNER" has some bugs in basic features
> that make it impossible for me to use GNU make on VMS.

vfork() on VMS just sets up a long jump and a flag for a future exec*() 
call.  The real vfork() processing is delayed until the exec*() is 
actually called.

VMS uses logical names for some of the exec() calls to find the images 
to run.  The GNV environment may not be setting those logical names in 
the ideal way for a self contained program like make/smake.

>>> I presume VMS has some way to share data when needed, though.
>> None that I have ever seen.
> 
> I would be interested in knowing how to implement shared data - maybe 
> using POSIX threads? There is a mmap(2) call on OpenVMS-8.3 but it does
> not seem work to create anonymous shared memory using mmap().

Shared data on VMS is from the system services to create and map global 
sections.

The mmap() on VMS uses this call, but has risks in using it, as it maps 
the file raw to the memory.  Except for VMS binary files, most VMS files 
have records and record attributes mixed in with them.  The C runtime 
hides this and makes most files look like they have LF separating the 
records, even when a different method is used.

-John
wb8tyw at qsl.network
Personal Opinion Only




More information about the Info-vax mailing list