diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-09-22 14:09:54 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-09-22 14:09:54 +0200 |
commit | d960371482d75711e61896f27ea0d3740ea69fe0 (patch) | |
tree | 6e7ffbd22d6dfb9ed71976e11999abcb93c31e9d /src/basic/util.h | |
parent | 8e112c803cb9b1ab1d564d0e5a7f06af59a2a30a (diff) |
util: introduce {send,receive}_one_fd()
Introduce two new helpers that send/receive a single fd via a unix
transport. Also make nspawn use them instead of hard-coding it.
Based on a patch by Krzesimir Nowak.
Diffstat (limited to 'src/basic/util.h')
-rw-r--r-- | src/basic/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/util.h b/src/basic/util.h index 8abaa740b2..905f375263 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -938,3 +938,6 @@ int reset_uid_gid(void); int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink); int fgetxattr_malloc(int fd, const char *name, char **value); + +int send_one_fd(int transport_fd, int fd); +int receive_one_fd(int transport_fd); |