summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-05-11 21:51:08 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-05-11 21:51:08 +0000
commit97d5b8f9d60c76e3bfd063f2ea552f344a29ee36 (patch)
tree13d8ba466a281e3e41e679cdf52336a643152c2f
parentad1652f1338c6249c3ab7c9bfa0a5ceef0f1c7c4 (diff)
Deal with unknown command line options more sanely.
-rw-r--r--libexec/atrun/atrun.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c
index 576ef6843f3..4c3d80c0652 100644
--- a/libexec/atrun/atrun.c
+++ b/libexec/atrun/atrun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atrun.c,v 1.17 2002/05/11 17:45:26 millert Exp $ */
+/* $OpenBSD: atrun.c,v 1.18 2002/05/11 21:51:07 millert Exp $ */
/*
* atrun.c - run jobs queued by at; run with root privileges.
@@ -71,7 +71,7 @@
/* File scope variables */
static char *namep;
-static char rcsid[] = "$OpenBSD: atrun.c,v 1.17 2002/05/11 17:45:26 millert Exp $";
+static char rcsid[] = "$OpenBSD: atrun.c,v 1.18 2002/05/11 21:51:07 millert Exp $";
static int debug = 0;
/* Local functions */
@@ -430,13 +430,9 @@ main(argc, argv)
debug++;
break;
- case '?':
- perr("unknown option");
- break;
-
default:
- perr("idiotic option - aborted");
- break;
+ syslog(LOG_ERR, "unknown option");
+ exit(EXIT_FAILURE);
}
}