From: Todd C. Miller Date: Tue, 19 May 1998 03:32:23 +0000 (+0000) Subject: add HAVE_WAITPID, HAVE_WAIT3, and sudo_waitpid() X-Git-Tag: SUDO_1_5_6~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59214c317df363ba92715362d0ed015efe7e0355;p=sudo add HAVE_WAITPID, HAVE_WAIT3, and sudo_waitpid() --- diff --git a/config.h.in b/config.h.in index 5d684def3..5e48dcf57 100644 --- a/config.h.in +++ b/config.h.in @@ -192,6 +192,12 @@ /* Define if you have seteuid(3). */ #undef HAVE_SETEUID +/* Define if you have waitpid(2). */ +#undef HAVE_WAITPID + +/* Define if you have wait3(2). */ +#undef HAVE_WAIT3 + /* Define if you have the header file. */ #undef HAVE_MALLOC_H @@ -269,6 +275,17 @@ /* and syslog(3) returns non-zero to denote failure */ #undef BROKEN_SYSLOG +/* + * Emulate a subset of waitpid() if we don't have it. + */ +#ifdef HAVE_WAITPID +#define sudo_waitpid(p, s, o) waitpid(p, s, o) +#else +#ifdef HAVE_WAIT3 +#define sudo_waitpid(p, s, o) wait3(s, o, NULL) +#endif +#endif + /* * Paths to commands used by sudo. There are used by pathnames.h. * If you want to override these values, do so in pathnames.h, not here!