From 363380391147ec9cc4525cfc2f75ee25bb01b79e Mon Sep 17 00:00:00 2001 From: Bandie Date: Mon, 19 Mar 2018 20:45:49 +0100 Subject: [PATCH] Fixed "get returncode" --- src/notify_touchy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/notify_touchy.c b/src/notify_touchy.c index 500755f..4f1300b 100644 --- a/src/notify_touchy.c +++ b/src/notify_touchy.c @@ -153,9 +153,9 @@ int main(int argc, char *argv[]){ wait(&statval); if(WIFEXITED(statval)){ if(verbose) - printf("Exit: %d\n", statval); + printf("Exit: %d\n", WEXITSTATUS(statval)); - if(statval != returncode){ + if(WEXITSTATUS(statval) != returncode){ char s[100]; sprintf(s, "Warning: %s returned something bad.", prog); printf("%s\n", s);