Subject: CVS commit: [thorpej-syslogd-hack-branch] src/usr.sbin/syslogd
To: None <source-changes@NetBSD.org>
From: Jason R Thorpe <email@example.com>
Date: 11/18/2004 23:01:31
Module Name: src
Committed By: thorpej
Date: Thu Nov 18 23:01:31 UTC 2004
src/usr.sbin/syslogd [thorpej-syslogd-hack-branch]: syslogd.c
Try to be more careful about using using the file descriptor f_file.
Syslogd should ensure that f_file is a valid file descriptor when
f_type is FILE, CONSOLE, TTY and for a PIPE where f_pid > 0. If the
descriptor is closed/invalid then the type should be set to UNUSED
or the pid should be set to 0.
To this end:
1) Don't close PIPE file descriptors if they are invalid.
2) If the call to p_open fails, don't set the pid.
To generate a diff of this commit:
cvs rdiff -r220.127.116.11 -r18.104.22.168 src/usr.sbin/syslogd/syslogd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.