[Bug 229775] syslog(3) includes process id in each message even if LOG_PID is specified as 2nd argument of openlog(3)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jul 14 19:03:55 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229775

            Bug ID: 229775
           Summary: syslog(3) includes process id in each message even if
                    LOG_PID is specified as 2nd argument of openlog(3)
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: yasu at utahime.org
 Attachment #195129 text/plain
         mime type:

Created attachment 195129
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=195129&action=edit
Sample program to reproduce the problem

On 12-CURRENT syslog(3) includes process id in each message even if LOG_PID is
specified as 2nd argument of openlog(3). Attached sample program reproduce the
problem.

On 11.2-RELEASE compiled program writes following messages.

Jul 15 03:45:35 eastasia syslogtest: Warning message without process ID.
Jul 15 03:45:35 eastasia syslogtest[65208]: Warning message with process ID.

At first LOG_PID is not specified as 2nd argument of openlog(3). So first
message doesn't include process id. And next LOG_PID is specified as 2nd
argument of openlog(3). So second message includes process id.

On 12-CURRENT (base r336196), on the other hand, compiled program writes
following messages.

Jul 15 03:50:57 rolling-vm-freebsd2 syslogtest[99867]: Warning message without
process ID.
Jul 15 03:50:57 rolling-vm-freebsd2 syslogtest[99867]: Warning message with
process ID.

This time first message includes process id even if LOG_PID is not specified as
2nd argument of openlog(3).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list