[Bug go/48018] New: libgo needs to handle Solaris 2 syslog

ro at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 7 14:15:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48018

           Summary: libgo needs to handle Solaris 2 syslog
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
        AssignedTo: ian@airs.com
        ReportedBy: ro@gcc.gnu.org
              Host: i386-pc-solaris2.11
            Target: i386-pc-solaris2.11
             Build: i386-pc-solaris2.11


The syslog test fails on Solaris 2:

syslog 
--- FAIL: syslog.TestDial
    Dial() failed: Unix syslog delivery error
--- FAIL: syslog.TestNew
    New() failed: Unix syslog delivery error
--- FAIL: syslog.TestNewLogger
    NewLogger() failed
FAIL

This is expected since go/syslog.go (unixSyslog) assumes that /dev/log or
/var/run/syslog can be used to communicate with syslogd.  This is unportable:
on Solaris, /dev/log isn't writable

crw-r-----    1 root     sys       56,   5 Jan 28 22:33 /dev/log

and syslogd uses /dev/conslog instead:

crw-rw-rw-    1 root     sys       56,   0 Jan 28 20:42 /dev/conslog

Apart from that, syslog.go assumes a unix domain socket, but Solaris syslog(3C)
uses STREAMS messages instead.

I wonder if it wouldn't be better to use the libc syslog functions instead
instead
of reimplementing them in Go.



More information about the Gcc-bugs mailing list