4 * Copyright 1998-2002 The OpenLDAP Foundation, Redwood City, California, USA
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
9 * Public License. A copy of this license is available at
10 * http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 * top-level directory of the distribution.
17 #include <sys/types.h>
20 # include <sys/wait.h>
23 #define LDAP_HI(s) (((s) >> 8) & 0377)
24 #define LDAP_LO(s) ((s) & 0377)
26 /* These should work on non-POSIX UNIX platforms,
27 all bets on off on non-POSIX non-UNIX platforms... */
29 # define WIFEXITED(s) (LDAP_LO(s) == 0)
32 # define WEXITSTATUS(s) LDAP_HI(s)
35 # define WIFSIGNALED(s) (LDAP_LO(s) > 0 && LDAP_HI(s) == 0)
38 # define WTERMSIG(s) (LDAP_LO(s) & 0177)
41 # define WIFSTOPPED(s) (LDAP_LO(s) == 0177 && LDAP_HI(s) != 0)
44 # define WSTOPSIG(s) LDAP_HI(s)
48 # define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED )
50 # define WAIT_FLAGS ( WNOHANG | WUNTRACED )
53 #endif /* _AC_WAIT_H */