On Wed, Oct 18, 2017 at 05:31:28PM +0200, Giacomo Tesio wrote:
> I have been a bit surprised to see that $* does not always contains
> the same as '/env/*':
> 
> % echo $*
> 
> % cat '/env/*'
> % lc
> bin/ lib/ tmp/
> % echo $*
> 
> % cat '/env/*'
> /bin/lc%
> 
> Not really an issue, but why this happens?

I guess...

When starting a command from rc, execforkexec() does fork(), which
is an equivalent of rfork(RFFDG|RFREND|RFPROC) and does not imply RFENVG.

As lc(1) is a shell script, its shell instance sets /env/'*'.

Hope this helps.

-- 
Antons

Reply via email to