[Info-vax] What would you miss if DECnet got the chop? Was: "bad select 38" (OpenSSL on VMS)

johnwallace4 at yahoo.co.uk johnwallace4 at yahoo.co.uk
Wed Sep 21 13:59:22 EDT 2016


On Wednesday, 21 September 2016 17:16:59 UTC+1, John Reagan  wrote:
> On Tuesday, September 20, 2016 at 5:06:56 PM UTC-4, Chris wrote:
> > On 09/20/16 17:17, Stephen Hoffman wrote:
> > 
> > >
> > > fork() is not available on OpenVMS, and has little direct relationship
> > > to the socket API. Code that uses fork() can range from fairly easy to
> > > port, to basically impossible. The stuff that's easy to port doesn't
> > > really use fork(), so it can be replaced with some combination of the
> > > vfork() and exec() calls.
> > >
> > 
> > Of course, i'm years out of date, but doesn't VMS have a spawn system
> > call to set of a new new process ? I guess the question being if
> > a spawned process inherits the parent environment or not.
> > 
> > 
> 
> From my experience, fork() usage falls into two categories.
> 
> 1) I want to make a new process and run some other image on it.  That is the vfork()/exec() sequence.
> 
> 2) I'm a really old program that is trying to roll-my-own threading package and I use fork() and hack up thread-local storage.  That code can be rewritten (moved forward a decade or two) and use a threading API.  However, TLS on our current compilers is less that is desired.

And (for those unfamiliar with this magick) my recollection
is the fork()/exec() sequence generally promptly destroys most
(all?) of the context inherited/cloned (on VMS, inherited
expensively, if at all) from the parent. Consequently 
fork()/exec() ends up being conceptually vaguely similar to
VMS spawn.

There have been a number of interesting vulnerabilities 
in recent years which occur because the forked process 
has inherited stuff which should not have been so easily
inherited. Heartlbleed and shellshock spring to mind.

fork() is also missing on Windows. Cygwin provides an
emulated fork(), as (allegedly) did Microsoft's own
Subsystem for UNIX Applications (now no longer available?)
https://msdn.microsoft.com/en-us/library/cc772343(v=ws.11).aspx

So it's not just VMS that has the forking problem.

ICBW. Correction welcome.



More information about the Info-vax mailing list