--- syslog.3 2021-05-06 13:46:01.100765000 -0400 +++ syslog.3,more 2021-05-06 13:49:13.380749000 -0400 @@ -162 +162 @@ -this option is enabled by default. +this option is enabled by default and cannot be disabled.
yikes. did I mess up this report. sorry. base for the diff is ... https://cgit.freebsd.org/src/tree/lib/libc/gen/syslog.3
According to lib/libc/gen/syslog.c ... (void)fprintf(fp, "%s ", LogTag == NULL ? NILVALUE : LogTag); /* * Provide the process ID regardless of whether LOG_PID has been * specified, as it provides valuable information. Many * applications tend not to use this, even though they should. */ ...
(In reply to Fernando Apesteguía from comment #3) That's correct. The relevant lines in syslog.c are ... /* * Provide the process ID regardless of whether LOG_PID has been * specified, as it provides valuable information. Many * applications tend not to use this, even though they should. */ (void)fprintf(fp, "%d ", getpid()); ... Previous to this, LOG_PID was optional. The man page only states that LOG_PID is now enabled by default for FreeBSD. Since LOG_PID used to be optional, some (like me) might reasonably expect that it would still be possible to disable LOG_PID. The above patch is meant to adjust the syslog(3) man page to make it clear that for FreeBSD, LOG_PID is now permanent, that it is no longer optional. Does that help?
(In reply to P Kern from comment #4) Sure thing. Thanks! I created a review: https://reviews.freebsd.org/D30188 Let's see how it goes :-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=94eb6c42ab4a2e2581e7cde6d8bd7e81c87a4442 commit 94eb6c42ab4a2e2581e7cde6d8bd7e81c87a4442 Author: Fernando ApesteguÃa <fernape@FreeBSD.org> AuthorDate: 2021-05-10 15:20:06 +0000 Commit: Fernando ApesteguÃa <fernape@FreeBSD.org> CommitDate: 2021-05-13 14:23:44 +0000 syslog.3 - Add detail about LOG_PID Document that LOG_PID is ignored and can not be disabled. This change was made along with the move from RFC 3164 to RFC 5424 log messages. PR: 255664 Reported by: des.gaufres@gmail.com Reviewed by: gbe, jilles Approved by: gbe (mentor, manpages), jilles lib/libc/gen/syslog.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Committed, Thanks!