summaryrefslogtreecommitdiff
path: root/footobar.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-10-27 19:30:09 +0200
committerBert Münnich <ber.t@posteo.de>2017-10-27 20:22:21 +0200
commit775b775240d09fe665efaecf2432d590567e68ef (patch)
treebf0f8b32c386fd7670c52623022a8ef576540c21 /footobar.c
parent7dc3033c862c30d8998ed3e4c98c056286f31401 (diff)
Fix exit value for -e with failed backquote or pipeline
This fixes rakitzis/rc issue #40. Both cases suffered from a misconception of statprint() in which the necessary check for -e happens. The checked status value gets passed to statprint() as an argument but the corresponding value passed to rc_exit() in case the status is non-zero comes from getstatus(), which requires that the checked status is written to statuses[] first. For pipelines this happened in the wrong order and for backquotes the status value was not put into statuses[] at all. Making statprint() a static helper function prevents this mistake by only leaving the setstatus family of functions to handle status codes.
Diffstat (limited to 'footobar.c')
0 files changed, 0 insertions, 0 deletions