SCCS-vsn: usr.sbin/sendmail/src/conf.c 6.61
-static char sccsid[] = "@(#)conf.c 6.60 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c 6.61 (Berkeley) %G%";
#endif /* not lint */
# include <sys/ioctl.h>
#endif /* not lint */
# include <sys/ioctl.h>
{
# ifdef WIFEXITED
auto int status;
{
# ifdef WIFEXITED
auto int status;
- while (waitpid(-1, &status, WNOHANG) > 0)
- continue;
+ count = 0;
+ while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
+ {
+ if (count++ > 1000)
+ {
+ syslog(LOG_ALERT, "reapchild: waitpid loop: pid=%d, status=%x",
+ pid, status);
+ break;
+ }
+ }
# else
# ifdef WNOHANG
union wait status;
# else
# ifdef WNOHANG
union wait status;