/bin/sh always uses spawn except in cases where it uses fork.   Most of the
latter cases are pretty obvious:  command &,  `command` / $(command), etc.

To have the spawns be local (same address space), you simply need to set
_BPX_SHAREAS=YES before the command.  In my example, /etc/profile is the
last place to set it via "export  _BPX_SHAREAS=YES".

Kirk
http://dovetail.com

PS> Gil, I'm astonished that you're astonished - we've been talking  about
BPXBATCH, BPXBATSL, AOPBATCH, COZBATCH (originally called DTLSPAWN)
and_BPX_SHAREAS etc, etc on ibm-main and mvs-oe since 2006-2007 :-)

On Thu, Oct 29, 2020 at 11:06 AM Paul Gilmartin <
[email protected]> wrote:

> On Thu, 29 Oct 2020 10:32:35 -0500, Kirk Wolf wrote:
> >
> >//SHELL  EXEC PGM=COZBATCH
> >//IN     DD   DSN=SYS1.MACLIB(ACB),DISP=SHR
> >//OUT    DD   SYSOUT=*
> >//STDIN  DD   *
> ># run the user's login shell in the same address space
> >fromdsn //DD:IN  | grep IBM | todsn //DD:OUT
> >//
> I'm astonished that neither fromdsn nor todsn was forked.  Is
> that  because of _BPX_SHAREAS=YES?  Where was that set?
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to