diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-01-05 00:43:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-01-05 00:43:45 +0000 |
commit | 245bd18b98b49158bfffe447accb65616ac74c50 (patch) | |
tree | c3e946a838ce06437fc0a87a45ad27b72f0a8fb8 /usr.bin/newsyslog/newsyslog.c | |
parent | 68dce44a8d7e42f80642aaa694df6cf102cd6d75 (diff) |
do not concern ourselves with MAX_PID
Diffstat (limited to 'usr.bin/newsyslog/newsyslog.c')
-rw-r--r-- | usr.bin/newsyslog/newsyslog.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c index 543ec745a89..470588f2dad 100644 --- a/usr.bin/newsyslog/newsyslog.c +++ b/usr.bin/newsyslog/newsyslog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newsyslog.c,v 1.16 1999/01/04 19:24:17 millert Exp $ */ +/* $OpenBSD: newsyslog.c,v 1.17 1999/01/05 00:43:44 deraadt Exp $ */ /* * Copyright (c) 1997, Jason Downs. All rights reserved. @@ -61,7 +61,7 @@ provided "as is" without express or implied warranty. */ #ifndef lint -static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.16 1999/01/04 19:24:17 millert Exp $"; +static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.17 1999/01/05 00:43:44 deraadt Exp $"; #endif /* not lint */ #ifndef CONF @@ -130,7 +130,6 @@ int monitor = 0; /* Don't do monitoring by default */ char *conf = CONF; /* Configuration file to use */ time_t timenow; #define MIN_PID 4 -#define MAX_PID 99999 char hostname[MAXHOSTNAMELEN]; /* hostname */ char *daytime; /* timenow in human readable form */ @@ -516,21 +515,21 @@ void dotrim(log, numdays, flags, perm, owner_uid, group_gid, daemon_pid) (void) chmod(log,perm); if (noaction) printf("kill -HUP %d\n",daemon_pid); - else if (daemon_pid < MIN_PID || daemon_pid > MAX_PID) + else if (daemon_pid < MIN_PID) warnx("preposterous process number: %d", daemon_pid); else if (kill(daemon_pid,SIGHUP)) - warnx("warning - could not HUP daemon"); - if (flags & CE_COMPACT) { - if (noaction) - printf("Compress %s.0\n",log); - else - compress_log(log); - } + warnx("warning - could not HUP daemon"); + if (flags & CE_COMPACT) { + if (noaction) + printf("Compress %s.0\n",log); + else + compress_log(log); + } } /* Log the fact that the logs were turned over */ int log_trim(log) - char *log; + char *log; { FILE *f; if ((f = fopen(log,"a")) == NULL) |