4 * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
7 * Redistribution and use in source and binary forms are permitted only
8 * as authorized by the OpenLDAP Public License. A copy of this
9 * license is available at http://www.OpenLDAP.org/license.html or
10 * in file LICENSE in the top-level directory of the distribution.
16 #include <sys/types.h>
19 # include <sys/wait.h>
22 #define LDAP_HI(s) (((s) >> 8) & 0377)
23 #define LDAP_LO(s) ((s) & 0377)
25 /* These should work on non-POSIX UNIX platforms,
26 all bets on off on non-POSIX non-UNIX platforms... */
28 # define WIFEXITED(s) (LDAP_LO(s) == 0)
31 # define WEXITSTATUS(s) LDAP_HI(s)
34 # define WIFSIGNALED(s) (LDAP_LO(s) > 0 && LDAP_HI(s) == 0)
37 # define WTERMSIG(s) (LDAP_LO(s) & 0177)
40 # define WIFSTOPPED(s) (LDAP_LO(s) == 0177 && LDAP_HI(s) != 0)
43 # define WSTOPSIG(s) LDAP_HI(s)
47 # define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED )
49 # define WAIT_FLAGS ( WNOHANG | WUNTRACED )
52 #endif /* _AC_WAIT_H */