summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-02-19 04:12:02 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-02-19 04:12:02 +0000
commit73783574792a8dc9538b0e20cd61f3177124f897 (patch)
tree62bea532a8d02da0f12a40ee187122bc95444f75 /src
parent9a3e10869c7581543aa7fc37b44e25cbba895f4b (diff)
downloadskalibs-73783574792a8dc9538b0e20cd61f3177124f897.tar.xz
- Add wait_estatus()
- version: rc for 2.3.1.0
Diffstat (limited to 'src')
-rw-r--r--src/include/skalibs/djbunix.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/skalibs/djbunix.h b/src/include/skalibs/djbunix.h
index 765fb3b..6bb7de8 100644
--- a/src/include/skalibs/djbunix.h
+++ b/src/include/skalibs/djbunix.h
@@ -83,7 +83,8 @@ extern pid_t waitpid_nointr (pid_t, int *, int) ;
#define wait_nohang(wstat) waitpid_nointr(-1, (wstat), WNOHANG)
extern pid_t wait_pid_nohang (pid_t, int *) ;
extern int wait_pids_nohang (pid_t const *, unsigned int, int *) ;
-#define wait_status(w) (WIFSIGNALED(w) ? 256 : WEXITSTATUS(w))
+#define wait_status(w) (WIFSIGNALED(w) ? 256 + WTERMSIG(w) : WEXITSTATUS(w))
+#define wait_estatus(w) (WIFSIGNALED(w) ? 128 + WTERMSIG(w) : WEXITSTATUS(w) >= 128 ? 128 : WEXITSTATUS(w))
extern unsigned int wait_reap (void) ;
extern int waitn (pid_t *, unsigned int) ;
extern int waitn_reap (pid_t *, unsigned int) ;