]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-daemon: Add vsock fallback to SOCK_STREAM 28010/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 13 Jun 2023 08:26:00 +0000 (10:26 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 13 Jun 2023 12:24:44 +0000 (14:24 +0200)
commit7f78d3431b4ea06a46258c32669092f94c06a7c9
tree91dc7155bf9f59057726af43d371d8c13f83099e
parent56d02f29695ab6d0c1a500d8621c754c93236d98
sd-daemon: Add vsock fallback to SOCK_STREAM

SOCK_SEQPACKET is only supported on recent kernels. Let's add a
fallback to SOCK_STREAM if it is not supported.

To accomodate SOCK_STREAM, we also modify
pid_notify_with_fds_internal() to do sendmsg() in a loop as with
SOCK_STREAM, sendmsg() is not guaranteed to write all data in a single
syscall or fail otherwise.
src/libsystemd/sd-daemon/sd-daemon.c