summaryrefslogtreecommitdiff
path: root/status.c
AgeCommit message (Collapse)Author
2018-03-20whitespace cleanupToby Goodwin
2017-10-27Fix exit value for -e with failed backquote or pipelineBert Münnich
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.
2015-05-161999-10-12tjg
Portability: status.c assumes traditional Unix layout of 0 and 1 exit statuses in the parent, which is not shared by BeOS. Add mkstatval.c.
2015-05-16move <sys/wait.h> magic into "wait.h"tgoodwin
2015-05-16only call WTERMSIG if WIFSIGNALEDtgoodwin
also, always check that WTERMSIG is in range
2015-05-16use POSIX wait() macrostgoodwin
2015-05-16Initial revisiontgoodwin
2015-05-16Initial revisiontim
2015-05-16beta: rc-1.5b2Toby Goodwin
2015-05-16beta: rc-1.5betadev1Byron Rakitzis
2015-05-16release: rc-1.4Byron Rakitzis