]> granicus.if.org Git - sudo/commitdiff
add HAVE_WAITPID, HAVE_WAIT3, and sudo_waitpid()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 19 May 1998 03:32:23 +0000 (03:32 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 19 May 1998 03:32:23 +0000 (03:32 +0000)
config.h.in

index 5d684def343814a9a627a7cd3868dc519eb6b22f..5e48dcf57983ccf248c70b5fbb6cdb83c1ffe67e 100644 (file)
 /* 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 <malloc.h> header file.  */
 #undef HAVE_MALLOC_H
 
 /* 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!