File time-debian-non-normal-exit.patch of Package time
Subject: Adjust non-normal exit code
* Introduced in Debian time version 1.7-16
* time.c: When time exits in a non-normal way, return 128 plus the
number of the signal which caused time to stop or abort. Thanks to
Steve Greenland and Herbert Xu for some clarification in this matter.
Author: Dirk Eddelbuettel
--- time-1.7.orig/time.c
+++ time-1.7/time.c
@@ -664,9 +664,9 @@
fflush (outfp);
if (WIFSTOPPED (res.waitstatus))
- exit (WSTOPSIG (res.waitstatus));
+ exit (WSTOPSIG (res.waitstatus) + 128);
else if (WIFSIGNALED (res.waitstatus))
- exit (WTERMSIG (res.waitstatus));
+ exit (WTERMSIG (res.waitstatus) + 128);
else if (WIFEXITED (res.waitstatus))
exit (WEXITSTATUS (res.waitstatus));
}