From owner-freebsd-hackers Sat Jan 18 23:11:34 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id XAA21345 for hackers-outgoing; Sat, 18 Jan 1997 23:11:34 -0800 (PST) Received: from pcpsj.pfcs.com (3VKnYLUtzZT6W7sD6lDSRkKGCbw6VhqL@harlan.fred.net [205.252.219.31]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id XAA21337 for ; Sat, 18 Jan 1997 23:11:29 -0800 (PST) Received: from mumps.pfcs.com (mumps.pfcs.com [192.52.69.11]) by pcpsj.pfcs.com (8.6.12/8.6.9) with SMTP id CAA27436 for ; Sun, 19 Jan 1997 02:11:25 -0500 Received: from localhost by mumps.pfcs.com with SMTP id AA06561 (5.67b/IDA-1.5 for ); Sun, 19 Jan 1997 02:11:24 -0500 To: freebsd-hackers@freebsd.org Subject: usr.sbin/ppp: reopen ppp.log on SIGUSR1? Date: Sun, 19 Jan 1997 02:11:22 -0500 Message-Id: <6559.853657882@mumps.pfcs.com> From: Harlan Stenn Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I'm looking for a way to have ppp reopen its log file after I "rotate out" the old one. I figure there are 2 ways to do this: - Have ppp "periodically" check the logfile and reopen it when it detects it's been rotated (stat the file and see if ctimespec != mtimespec, right?) - Reopen the logfile upon receipt of a signal The problem with the first alternative is that ctimespec != mtimespec only until the next write to the log file. If we don't check during that time, we'll miss detecting that the file's been rotated. That leaves the signal() approach. Anybody have a problem with my submitting a patch to reopen the log file upon receipt of, say, SIGUSR1? H