]> git.ipfire.org Git - thirdparty/systemd.git/commit
fd-util: Expose helper to pack fds into 3,4,5,...
authorAdrian Vovk <adrianvovk@gmail.com>
Tue, 13 Feb 2024 20:09:54 +0000 (15:09 -0500)
committerLuca Boccassi <bluca@debian.org>
Mon, 19 Feb 2024 11:18:11 +0000 (11:18 +0000)
commit85f660d46bf73d6b2853fc19acddf3e099a36d03
tree3d844393d93de675d896f7839b45e738346b0c2f
parent034569150f88f9dd54f63b35d9d0e4f78a652504
fd-util: Expose helper to pack fds into 3,4,5,...

This is useful for situations where an array of FDs is to be passed into
a child process (i.e. by passing it through safe_fork). This function
can be called in the child (before calling exec) to pack the FDs to all
be next to each-other starting from SD_LISTEN_FDS_START (i.e. 3)
src/basic/fd-util.c
src/basic/fd-util.h
src/basic/process-util.c
src/basic/process-util.h
src/core/exec-invoke.c
src/shared/exec-util.c