]> git.ipfire.org Git - thirdparty/chrony.git/commit
privops: use SOCK_SEQPACKET sockets when supported
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 8 Dec 2015 09:20:20 +0000 (10:20 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 8 Dec 2015 16:38:56 +0000 (17:38 +0100)
commitaa4bf4140023dc009753a7b1ea41e85dbb18dd16
tree1eb2c74410e2c0b35732d6d29cbfe76fe8b4f4cc
parent4e32de09a2bafaa690bab160209bac0f39d9af6d
privops: use SOCK_SEQPACKET sockets when supported

SOCK_SEQPACKET is preferred over SOCK_DGRAM for communication with the
helper as the process will get an error when the other end of the socket
is closed. It's not supported on all platforms.

If SOCK_SEQPACKET is defined, try creating the pair of sockets with this
type first and if that fails, fall back to SOCK_DGRAM.
privops.c