>Unfortunately, NO.

Thit is not a correct answer, see below.

>I went through the same thing, when we first implemented UNIX 
>System Services. This is z/OS's (previously ESA 5.2 & OS/390) method 
>of emulating the UNIX fork of a process.
>A spawn is even 'worse', since the originating address space 
>goes away.

fork() and spawn() both create a new process. Whether the parent
process goes way or not is solely dependent on the code that follows
the fork() or spawn() in the parent process. Some will terminate some
will not. This is pure UNIX design and works this was on any UNIX 
flavour.

z/OS normally uses a new address space for a new process, but has 
a "performance option" built into spawn() that offers the possibility
to share a single address space between the parent and the child (or 
multiple children). Note that I wrote "possibility", which implies that
there are cases where parent and child may not share the address space
(see the z/OS UNIX manuals as well as the z/OS XL C/C++ Runtime Library
Reference for details). Note that fork() always creates the child in
a new address space.

As for BPXBATCH, this normally uses spawn() but does a fork() in some
cases. When it does a spawn() the current value of _BPX_SHAREAS 
influences how spawn() creates the new process. If _BPX_SHAREAS is set
to either YES or MUST, then spwan() will *try* to create a local
process,
i.e. it will try to use the current address space. *But* limitations
may inhibit the use of the current address space (see manuals mentioned
above). 

BPXBATSL is the same program as BPXBATCH, only that if called by this
name
it internally sets _BPX_SHARESA=MUST for the duration of the spawn().

--
Peter Hunkeler
Credit Suisse

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to