Fixed "get returncode"
This commit is contained in:
parent
b23504d2d2
commit
3633803911
@ -153,9 +153,9 @@ int main(int argc, char *argv[]){
|
|||||||
wait(&statval);
|
wait(&statval);
|
||||||
if(WIFEXITED(statval)){
|
if(WIFEXITED(statval)){
|
||||||
if(verbose)
|
if(verbose)
|
||||||
printf("Exit: %d\n", statval);
|
printf("Exit: %d\n", WEXITSTATUS(statval));
|
||||||
|
|
||||||
if(statval != returncode){
|
if(WEXITSTATUS(statval) != returncode){
|
||||||
char s[100];
|
char s[100];
|
||||||
sprintf(s, "Warning: %s returned something bad.", prog);
|
sprintf(s, "Warning: %s returned something bad.", prog);
|
||||||
printf("%s\n", s);
|
printf("%s\n", s);
|
||||||
|
Loading…
Reference in New Issue
Block a user