[Buildroot] [PATCH 1/3] eudev: fix error handling init script
Peter Korsgaard
peter at korsgaard.com
Wed Jan 31 12:35:57 UTC 2018
>>>>> "Carlos" == Carlos Santos <casantos at datacom.ind.br> writes:
> Replace (echo "msg" && exit 1) by { echo "msg"; exit 1; }.
> The (list) compound command runs in a subshell, so the "exit" interrupts
> the subshell, not the main script. Examples:
> $ sh -c "echo 1; (exit 1); echo 2"
> 1
> 2
> $ sh -c "echo 1; { exit 1; }; echo 2"
> 1
> $
> Signed-off-by: Carlos Santos <casantos at datacom.ind.br>
Committed to 2017.02.x and 2017.11.x, thanks.
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list