[sf-lug] Trouble with child programs is that there's no way for a child to (alter) it's parent's environment ...

Michael Paoli Michael.Paoli at cal.berkeley.edu
Fri Aug 26 18:41:32 PDT 2016


> From: jim <jim at well.com>
> Subject: Re: [sf-lug] 'source' works but 'shebang' doesn't
> Date: Fri, 26 Aug 2016 22:06:54 +0000

>     Trouble with child programs is that there's
> (famously) no way for a child to write to its
> parent's envionment.
>     There's Inter-Process Communication (IPC)
> but I'm unclear about that.
>     The only persistent means is to write to the
> file system, which ain't bad for testing:

Yea, but using file(s) for that has all the issues of file I/O and
overhead thereof, cleanup, possible race conditions & security, etc.

A few hints - at least for most shells:
eval
command substitution
Also have a look at the man page for ssh-agent(1) for practical examples.





More information about the sf-lug mailing list