From owner-freebsd-bugs Sat Jul 19 11:30:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA06303 for bugs-outgoing; Sat, 19 Jul 1997 11:30:03 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA06294; Sat, 19 Jul 1997 11:30:01 -0700 (PDT) Resent-Date: Sat, 19 Jul 1997 11:30:01 -0700 (PDT) Resent-Message-Id: <199707191830.LAA06294@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, joes@spiritone.com Received: from ridge.spiritone.com (ridge.spiritone.com [205.139.108.2]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA06043 for ; Sat, 19 Jul 1997 11:23:50 -0700 (PDT) Received: from joes.users.spiritone.com (joes.users.spiritone.com [205.139.111.224]) by ridge.spiritone.com (8.8.6/8.8.6) with ESMTP id LAA09599 for ; Sat, 19 Jul 1997 11:23:18 -0700 (PDT) Received: (from joes@localhost) by joes.users.spiritone.com (8.8.6/8.8.6) id LAA00510; Sat, 19 Jul 1997 11:23:08 -0700 (PDT) Message-Id: <199707191823.LAA00510@joes.users.spiritone.com> Date: Sat, 19 Jul 1997 11:23:08 -0700 (PDT) From: Joseph Stein Reply-To: joes@spiritone.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/4122: syslogd has undesired effect when logging to a program Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4122 >Category: bin >Synopsis: behaviour of src/usr.sbin/syslogd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jul 19 11:30:01 PDT 1997 >Last-Modified: >Originator: Joseph Stein >Organization: >Release: FreeBSD 2.2-STABLE i386 >Environment: This pr is based on a syslog.conf file that contains the following line: *.warning |/usr/local/bin/qpage -p joes qpage is the QuickPage daemon, which compiles more-or-less out of the box on FreeBSD. (Read freebsd-questions (I think)) for the location. >Description: The default behaviour of syslogd is to keep pipes open until no longer needed (I believe, based on man pages and experience). This can be undesired if you wish to have any types of syslog messages transmitted to an alphanumeric pager, because it can take a long time (in one case here, about twelve hours) for the pipe to be closed, and therefore the page to be sent. (in this case). I poked around in the source for syslogd and think I have come to a compatible change, that closes the pipe after each log entry is written. I realize that this is an inefficient use of system resources; but it was the easiest way to achieve my desired result. >How-To-Repeat: Setup a logging definition to log to a pipe. >Fix: Index: src/usr.sbin/syslogd/syslogd.c =================================================================== RCS file: /usr/cvs/src/usr.sbin/syslogd/syslogd.c,v retrieving revision 1.12.2.6 diff -r1.12.2.6 syslogd.c 772a773,777 > (void)close(f->f_file); > if (f->f_un.f_pipe.f_pid > 0) > deadq_enter(f->f_un.f_pipe.f_pid); > f->f_un.f_pipe.f_pid = 0; >Audit-Trail: >Unformatted: