bin/87981: ipmon writes pid file even when not in daemon mode
Sergey Svishchev
svs+pr at grep.ru
Tue Oct 25 05:30:14 PDT 2005
>Number: 87981
>Category: bin
>Synopsis: ipmon writes pid file even when not in daemon mode
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Oct 25 12:30:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Sergey Svishchev
>Release: 5.2.1
>Organization:
>Environment:
>Description:
ipmon is supposed to write its PID to /var/run/ipmon.pid only when it is running as daemon; however, it does that even if -D is not specified.
Consequently, if newsyslog is configured to rotate ipmon's log file and notify ipmon afterwards, it is unable to do so, since pid file contains wrong PID.
>How-To-Repeat:
>Fix:
--- ipmon.c.orig 2005-07-25 14:34:05.379137800 +0400
+++ ipmon.c 2005-07-25 14:23:16.000000000 +0400
@@ -1417,8 +1417,8 @@
#endif /* !BSD */
close(0);
close(1);
+ write_pid(pidfile);
}
- write_pid(pidfile);
signal(SIGHUP, handlehup);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list