Page MenuHomeFreeBSD

D3081.id6935.diff
No OneTemporary

D3081.id6935.diff

Index: usr.sbin/syslogd/syslogd.c
===================================================================
--- usr.sbin/syslogd/syslogd.c
+++ usr.sbin/syslogd/syslogd.c
@@ -1025,6 +1025,7 @@
sizeof(f->f_lasttime));
fprintlog(f, flags, msg);
(void)close(f->f_file);
+ f->f_file = -1;
}
(void)sigsetmask(omask);
return;
@@ -1314,6 +1315,7 @@
if (errno != ENOSPC) {
int e = errno;
(void)close(f->f_file);
+ f->f_file = -1;
f->f_type = F_UNUSED;
errno = e;
logerror(f->f_un.f_fname);
@@ -1339,6 +1341,7 @@
if (writev(f->f_file, iov, IOV_SIZE) < 0) {
int e = errno;
(void)close(f->f_file);
+ f->f_file = -1;
if (f->f_un.f_pipe.f_pid > 0)
deadq_enter(f->f_un.f_pipe.f_pid,
f->f_un.f_pipe.f_pname);
@@ -1447,6 +1450,7 @@
if (f->f_type == F_PIPE &&
f->f_un.f_pipe.f_pid == pid) {
(void)close(f->f_file);
+ f->f_file = -1;
f->f_un.f_pipe.f_pid = 0;
log_deadchild(pid, status,
f->f_un.f_pipe.f_pname);
@@ -1551,6 +1555,7 @@
fprintlog(f, 0, (char *)NULL);
if (f->f_type == F_PIPE && f->f_un.f_pipe.f_pid > 0) {
(void)close(f->f_file);
+ f->f_file = -1;
f->f_un.f_pipe.f_pid = 0;
}
}
@@ -1635,10 +1640,12 @@
case F_CONSOLE:
case F_TTY:
(void)close(f->f_file);
+ f->f_file = -1;
break;
case F_PIPE:
if (f->f_un.f_pipe.f_pid > 0) {
(void)close(f->f_file);
+ f->f_file = -1;
deadq_enter(f->f_un.f_pipe.f_pid,
f->f_un.f_pipe.f_pname);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 24, 10:30 AM (3 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26012792
Default Alt Text
D3081.id6935.diff (1 KB)

Event Timeline