diff --git a/CHANGES b/CHANGES index 1c40f08..576c595 100644 --- a/CHANGES +++ b/CHANGES @@ -64,8 +64,6 @@ Version 1.5 - use newer query_module function rather than stepping through /dev/kmem. . Matthew Fischer - Remove special treatment of the percent sign in klogd - . Andreas Barth - - Prevent pipes from becoming the controlling tty Version 1.4.1 diff --git a/syslogd.c b/syslogd.c index 45b44f6..289976e 100644 --- a/syslogd.c +++ b/syslogd.c @@ -487,9 +487,6 @@ static char sccsid[] = "@(#)syslogd.c 5.27 (Berkeley) 10/10/88"; * Sat May 26 12:22:44 CEST 2007: Martin Schulze * Properly accompany the MARK message with the facility. * - * Mon May 28 19:00:37 CEST 2007: Andreas Barth - * Prevent pipes from becoming the controlling tty. - * * Mon May 28 19:44:39 CEST 2007: Martin Schulze * Notify the waiting parent process if the client dies to it * doesn't wait the entire five minutes. @@ -2739,12 +2736,13 @@ void cfline(line, f) if (syncfile) f->f_flags |= SYNC_FILE; if ( *p == '|' ) { + f->f_file = open(++p, O_RDWR|O_NONBLOCK); f->f_type = F_PIPE; - p++; - } else + } else { + f->f_file = open(p, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY, + 0644); f->f_type = F_FILE; - f->f_file = open(p, O_WRONLY|O_APPEND|O_CREAT|O_NONBLOCK|O_NOCTTY, - 0644); + } if ( f->f_file < 0 ){ f->f_file = -1;