Re: syslog() blocks on glibc 2.1.3 with kernel 2.2.x

From: David S. Miller (davem@redhat.com)
Date: Mon Oct 23 2000 - 14:28:36 EST


   From: patl@cag.lcs.mit.edu (Patrick J. LoPresti)
   Date: 23 Oct 2000 15:28:58 -0400

   OK, but my current syslogd only listens to /dev/log as a
   SOCK_DGRAM. If I wanted reliable syslogging, it would be listening
   on it as a SOCK_STREAM.

SOCK_DGRAM over AF_UNIX is reliable, it's a local transport.

With AF_UNIX the only real difference between SOCK_DGRAM and
SOCK_STREAM is whether writes must be atomic. F.e. for the SOCK_DGRAM
case if you try to perform a write() larger than the socket buffer
size you'll get a EMSGSIZE return, whereas for the same example in
the SOCK_STREAM case the kernel will chop up the message for you and
send over the pieces seperately to the peer socket.

Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:21 EST