Date: Mon, 30 Nov 1998 11:18:05 -0500 (EST) From: thomas@stromberg.org To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/8906: newsyslog.c problem. Message-ID: <199811301618.LAA15831@under.suspicion.org>
index | next in thread | raw e-mail
>Number: 8906
>Category: bin
>Synopsis: newsyslog errors out if PID is >30000
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 30 08:20:01 PST 1998
>Last-Modified:
>Originator: Thomas Stromberg
>Organization:
Research Triangle Consultants, Inc.
>Release: FreeBSD 3.0-CURRENT i386
>Environment:
FreeBSD under.suspicion.org 3.0-CURRENT FreeBSD 3.0-CURRENT #0:
Tue Nov 24 10:04:39 EST 1998
ventrex@under.suspicion.org:/vol/1/usr/src/sys/compile/blowntoad i386
>Description:
If syslogd is ever restarted and gets a PID with a PID >30000,
newsyslog errors out with "preposterous process number"
This comes from:
#define MAX_PID 30000 /* was 65534, see /usr/include/sys/proc.h */
if (pid < MIN_PID || pid > MAX_PID) {
warnx("preposterous process number: %d", (int)pid);
pid = 0;
}
>How-To-Repeat:
Restart syslogd in a >30000 PID enviroment. This happened to me
several times during the "dying daemons" bug.
>Fix:
Use this definition from /usr/include/sys/proc.h
#define PID_MAX 99999
instead of #defining it inside of newsyslog.c ... -or- if your going
to bother with defining it in newsyslog.c, at least boost it to 99999.
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811301618.LAA15831>
