aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/time
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-10-12 18:41:26 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-10-12 18:41:26 +0000
commitbc2c47df4b9315ceac0f3f4800021d1b453a0262 (patch)
treee044547b532fb89942e1247a27044f2cab2d89b8 /usr.bin/time
parente07fd62c164bc7cfc3ee74f5acfc3050038ba4a8 (diff)
Notes
Diffstat (limited to 'usr.bin/time')
-rw-r--r--usr.bin/time/time.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c
index e911d8c649d8..96b160772b7b 100644
--- a/usr.bin/time/time.c
+++ b/usr.bin/time/time.c
@@ -46,6 +46,8 @@ static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93";
#include <sys/resource.h>
#include <sys/signal.h>
#include <sys/sysctl.h>
+#include <stdlib.h>
+#include <sys/wait.h>
#include <err.h>
#include <stdio.h>
@@ -149,7 +151,7 @@ main(argc, argv)
fprintf(stderr, "%10ld %s\n",
ru.ru_nivcsw, "involuntary context switches");
}
- exit (status>>8);
+ exit (WIFEXITED(status) ? WEXITSTATUS(status) : EXIT_FAILURE);
}
/*