summaryrefslogtreecommitdiffhomepage
path: root/sysklogd
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>1999-12-16 20:59:36 +0000
committerErik Andersen <andersen@codepoet.org>1999-12-16 20:59:36 +0000
commit1c5b2589d1287008899c07f45541286fe8c37508 (patch)
tree6c9772d2bb9b54f6508ff77a8dd30982e227ab83 /sysklogd
parent6f23cec5d081fac63a7a0c493d6caff77e55dfb1 (diff)
Fix bugs in logger and syslogd. Add fbset.
-Erik
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/logger.c9
-rw-r--r--sysklogd/syslogd.c1
2 files changed, 4 insertions, 6 deletions
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index dfbc557ec..5ef622dc3 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -120,6 +120,7 @@ extern int logger_main(int argc, char **argv)
int fd, pri = LOG_USER|LOG_NOTICE;
int fromStdinFlag=FALSE;
int toStdErrFlag=FALSE;
+ int stopLookingAtMeLikeThat=FALSE;
char *message, buf[1024], buf1[1024];
time_t now;
size_t addrLength;
@@ -129,7 +130,8 @@ extern int logger_main(int argc, char **argv)
if (*((*argv)+1) == '\0') {
fromStdinFlag=TRUE;
}
- while (*(++(*argv))) {
+ stopLookingAtMeLikeThat=FALSE;
+ while (*(++(*argv)) && stopLookingAtMeLikeThat==FALSE) {
switch (**argv) {
case 's':
toStdErrFlag = TRUE;
@@ -139,10 +141,7 @@ extern int logger_main(int argc, char **argv)
usage(logger_usage);
}
pri = pencode(*(++argv));
- if (--argc == 0) {
- usage(logger_usage);
- }
- ++argv;
+ stopLookingAtMeLikeThat=TRUE;
break;
default:
usage(logger_usage);
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 24c721f8e..43e83b191 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -164,7 +164,6 @@ static void domark(int sig)
{
if (MarkInterval > 0) {
logMessage(LOG_SYSLOG|LOG_INFO, "-- MARK --");
- signal(SIGALRM, domark);
alarm(MarkInterval);
}
}