]> git.ipfire.org Git - thirdparty/systemd.git/commit
socket-util: Introduce send_one_fd_iov() and receive_one_fd_iov()
authorFilipe Brandenburger <filbranden@google.com>
Wed, 25 Jul 2018 01:46:01 +0000 (18:46 -0700)
committerFilipe Brandenburger <filbranden@google.com>
Thu, 2 Aug 2018 16:25:04 +0000 (09:25 -0700)
commitd34673ecb825aa9ecf6958b0caab792f5061c56a
treef3d4e3a2700e37048cda9358043148d1477ee4e3
parent27d4866ad8dcbe95cfc4d59357c65c559737c1ae
socket-util: Introduce send_one_fd_iov() and receive_one_fd_iov()

These take a struct iovec to send data together with the passed FD.

The receive function returns the FD through an output argument. In case data is
received, but no FD is passed, the receive function will set the output
argument to -1 explicitly.

Update code in dynamic-user to use the new helpers.
src/basic/socket-util.c
src/basic/socket-util.h
src/core/dynamic-user.c