BSD 4_4 release
[unix-history] / usr / src / usr.sbin / cron / cron.c
index a6c868b..94ac219 100644 (file)
@@ -1,6 +1,21 @@
+/*-
+ * Copyright (c) 1986, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * This module is believed to contain source code proprietary to AT&T.
+ * Use and redistribution is subject to the Berkeley Software License
+ * Agreement and your Software Agreement with AT&T (Western Electric).
+ */
+
+#ifndef lint
+static char copyright[] =
+"@(#) Copyright (c) 1986, 1993\n\
+       The Regents of the University of California.  All rights reserved.\n";
+#endif /* not lint */
+
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)cron.c      4.16 (Berkeley) 6/29/90";
-#endif
+static char sccsid[] = "@(#)cron.c     8.1 (Berkeley) 6/6/93";
+#endif /* not lint */
 
 #include <sys/types.h>
 #include <sys/signal.h>
 
 #include <sys/types.h>
 #include <sys/signal.h>
@@ -33,7 +48,7 @@ struct        tm *loct;
 struct tm *localtime();
 char   *malloc();
 char   *realloc();
 struct tm *localtime();
 char   *malloc();
 char   *realloc();
-int    reapchild();
+void   reapchild();
 int    flag;
 char   *list;
 char   *listend;
 int    flag;
 char   *list;
 char   *listend;
@@ -352,12 +367,13 @@ register c;
        return(n);
 }
 
        return(n);
 }
 
+void
 reapchild()
 {
        union wait status;
        int pid;
 
 reapchild()
 {
        union wait status;
        int pid;
 
-       while ((pid = wait3(&status, WNOHANG, (struct rusage *)0)) > 0)
+       while ((pid = wait3((int *)&status, WNOHANG, (struct rusage *)0)) > 0)
                dprintf(debug, "%d: child exits with signal %d status %d\n",
                        pid, status.w_termsig, status.w_retcode),
                        fflush (debug);
                dprintf(debug, "%d: child exits with signal %d status %d\n",
                        pid, status.w_termsig, status.w_retcode),
                        fflush (debug);