aboutsummaryrefslogtreecommitdiff
path: root/watch.c
diff options
context:
space:
mode:
Diffstat (limited to 'watch.c')
-rw-r--r--watch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/watch.c b/watch.c
index aa4d38b..d2d7b45 100644
--- a/watch.c
+++ b/watch.c
@@ -24,6 +24,7 @@ static const char version[] = "1.0";
#include <sys/ioctl.h>
#include <sys/time.h>
+#include <sys/wait.h>
#include <curses.h>
#include <limits.h>
@@ -194,7 +195,7 @@ main(int argc, char **argv)
if (ret != 0)
(void)fprintf(stderr, "%s: %s", __progname, out);
- return (ret >> 8); /* XXX */
+ return ret;
}
int
@@ -245,7 +246,7 @@ display(WINDOW *outw, char *cmd, char *out, size_t sz)
}
}
raise(SIGINT);
- return ret;
+ return WEXITSTATUS(ret);
}
void