Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/atrun jeez, this program included almost everything ...
details: https://anonhg.NetBSD.org/src/rev/2da94b1c193f
branches: trunk
changeset: 534519:2da94b1c193f
user: christos <christos%NetBSD.org@localhost>
date: Mon Jul 29 00:35:49 2002 +0000
description:
jeez, this program included almost everything in /usr/include!
diffstat:
libexec/atrun/atrun.c | 26 ++++++++++----------------
1 files changed, 10 insertions(+), 16 deletions(-)
diffs (71 lines):
diff -r 642eda687859 -r 2da94b1c193f libexec/atrun/atrun.c
--- a/libexec/atrun/atrun.c Sun Jul 28 23:43:33 2002 +0000
+++ b/libexec/atrun/atrun.c Mon Jul 29 00:35:49 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atrun.c,v 1.9 2002/06/06 09:29:31 martin Exp $ */
+/* $NetBSD: atrun.c,v 1.10 2002/07/29 00:35:49 christos Exp $ */
/*
* atrun.c - run jobs queued by at; run with root privileges.
@@ -26,27 +26,22 @@
*/
/* System Headers */
+#include <sys/types.h>
+#include <sys/wait.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/param.h>
#include <ctype.h>
+#include <errno.h>
#include <dirent.h>
-#include <errno.h>
#include <fcntl.h>
-#include <pwd.h>
-#include <grp.h>
-#include <signal.h>
-#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <time.h>
#include <unistd.h>
#include <syslog.h>
-#include <utmp.h>
-
+#include <pwd.h>
+#include <err.h>
#include <paths.h>
/* Local headers */
@@ -62,7 +57,7 @@
#if 0
static char rcsid[] = "$OpenBSD: atrun.c,v 1.7 1997/09/08 22:12:10 millert Exp $";
#else
-__RCSID("$NetBSD: atrun.c,v 1.9 2002/06/06 09:29:31 martin Exp $");
+__RCSID("$NetBSD: atrun.c,v 1.10 2002/07/29 00:35:49 christos Exp $");
#endif
static int debug = 0;
@@ -81,7 +76,7 @@
const char *a;
{
if (debug)
- perror(a);
+ warn(a);
else
syslog(LOG_ERR, "%s: %m", a);
@@ -93,8 +88,7 @@
char *a, *b;
{
if (debug) {
- (void)fputs(a, stderr);
- perror(b);
+ warn("%s%s", a, b);
} else
syslog(LOG_ERR, "%s%s: %m", a, b);
Home |
Main Index |
Thread Index |
Old Index