[CMD] ExecutePipeline() returns the last error level (set to process exit code).
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 18 Nov 2017 19:50:50 +0000 (20:50 +0100)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 18 Nov 2017 19:59:06 +0000 (20:59 +0100)
commit56a19b1439effc8a3990f97ff9241379d55a07cb
treeab8910bb0862de1cd5719e57b86b36c54ebf8a00
parent0701527f200a37e29f94fb7f4d350274f0b344bb
[CMD] ExecutePipeline() returns the last error level (set to process exit code).
CORE-13974

This should fix situations where (for example):
   command_1 | command_2 && echo Succeeded
should *NOT* run "echo Succeeded" if any of the command_1 or command_2 has
failed.

This also makes the ExecutePipeline() function on par with the other
"ExecuteXXX()" helpers.

Problem diagnosed by Doug Lyons; patch inspired by contributor 'cagey45'.
base/shell/cmd/cmd.c