help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sub-process changing value available to parent process?


From: Sylvain Viart
Subject: sub-process changing value available to parent process?
Date: Sun, 5 Apr 2020 08:55:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

Hi,

This idea come back again. I would like to be able to modify bash
variable from a child program.

As the child program has no access to parent's variable space, one
solution is that the child-program
ouputs bash valid code and the parent script uses eval() so the current
env is modified.

We see this behavior when using ssh-agent for example.

I would like to be able to pass modified value to the shell parent
without using eval.

What shared environment could I use to ensure safe and efficient
communication from a sub program with it's parent script?


Regards,
Sylvain.

-- 
Sylvain Viart - GNU/Linux Sysadmin/Developer/DevOps - France




reply via email to

[Prev in Thread] Current Thread [Next in Thread]