On Thu, 29 Oct 2020 16:21:00 -0500, Kirk Wolf wrote:

>/bin/sh always uses spawn except in cases where it uses fork.   Most of the
>latter cases are pretty obvious:  command &,  `command` / $(command), etc.
> 
I would expect one case requiring fork() is "( list )" because "list" inherits
non-exported shell variables while running in a separate execution
environment.  E.g.:

510 $ x=foobar; ( echo $x; x=wombat; echo $x ); echo $x
foobar
wombat
foobar

>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".

Thanks,
gil

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

Reply via email to