Currently exitcmd sets exitstatus and then savestatus if the latter
was previously set. In fact, as exitcmd always raises an exception
and will either end up in the setjmp call in main() or exitshell(),
where exitstatus is always replaced by savestatus if set, we only
need to set savestatus.
Sign
Leah Neukirchen wrote:
> Hi,
>
> as of dash 0.5.10, this script waits for the sleep to terminate before
> executing the last line, which no other /bin/sh does.
> dash 0.5.9.1 worked fine.
>
>
> #!/bin/sh
> sleep 3 &
> echo first in main shell
> ( echo in subshell; )
> echo back to main shell
>
Previously reset was called after exitshell. This was changed
so that it was called before exitshell because certain state needed
to be reset in order for the EXIT trap to work.
However, this caused issues because certain other states (such
as local variables) should not be reset. This patch fix
Herbert Xu writes:
> Leah Neukirchen wrote:
>> Hi,
>>
>> as of dash 0.5.10, this script waits for the sleep to terminate before
>> executing the last line, which no other /bin/sh does.
>> dash 0.5.9.1 worked fine.
>>
>>
>> #!/bin/sh
>> sleep 3 &
>> echo first in main shell
>> ( echo in subshe