Created attachment 147978 [details] patch to add filename to error message When newsyslog receives an error when signalling a process, the resulting error message provides no information to to identify which entry in newsyslog.conf failed. The attached patch adds the name of the pid file to the error message, to aid in identifying the problematic entry.
Created attachment 148083 [details] proposed alternative Thanks for the patch. I reworked it slightly: sw_fname is not a pointer and thus does not need to be checked for NULL. I also changed the message to use the same wording as a similar printf below.
> Thanks for the patch. I reworked it slightly: sw_fname is not a pointer and > thus does not need to be checked for NULL. Doh! Thanks for catching that.
A commit references this bug: Author: markj Date: Wed Oct 8 17:44:31 UTC 2014 New revision: 272763 URL: https://svnweb.freebsd.org/changeset/base/272763 Log: If we fail to send a signal after rotation, print the pidfile from which the corresponding PID was obtained. PR: 194143 Submitted by: Lyndon Nerenberg <lyndon@orthanc.ca> MFC after: 1 week Changes: head/usr.sbin/newsyslog/newsyslog.c
A commit references this bug: Author: markj Date: Thu Oct 23 18:48:44 UTC 2014 New revision: 273553 URL: https://svnweb.freebsd.org/changeset/base/273553 Log: MFC 272763: If we fail to send a signal after rotation, print the pidfile from which the corresponding PID was obtained. PR: 194143 Changes: _U stable/9/usr.sbin/newsyslog/ stable/9/usr.sbin/newsyslog/newsyslog.c
A commit references this bug: Author: markj Date: Thu Oct 23 18:50:45 UTC 2014 New revision: 273554 URL: https://svnweb.freebsd.org/changeset/base/273554 Log: MFC r272763: If we fail to send a signal after rotation, print the pidfile from which the corresponding PID was obtained. PR: 194143 Changes: _U stable/10/ stable/10/usr.sbin/newsyslog/newsyslog.c