diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-10-26 18:45:33 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-10-26 22:30:42 +0200 |
commit | 711364049338677a8792285f0c38c039344931ed (patch) | |
tree | d1d29243500304ccb0f284b4ccf485325a4931eb /src/core/exec-invoke.c | |
parent | nspawn: Make parameter provided_mac a const for setup_veth() (diff) | |
download | systemd-711364049338677a8792285f0c38c039344931ed.tar.xz systemd-711364049338677a8792285f0c38c039344931ed.zip |
fd-uitl: rename PIPE_EBADF → EBADF_PAIR, and add EBADF_TRIPLET
We use it for more than just pipe() arrays. For example also for
socketpair(). Hence let's give it a generic name.
Also add EBADF_TRIPLET to mirror this for things like
stdin/stdout/stderr arrays, which we use a bunch of times.
Diffstat (limited to 'src/core/exec-invoke.c')
-rw-r--r-- | src/core/exec-invoke.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index 3b8cec8258..9be39a5610 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -2080,7 +2080,7 @@ static int build_pass_environment(const ExecContext *c, char ***ret) { static int setup_private_users(uid_t ouid, gid_t ogid, uid_t uid, gid_t gid) { _cleanup_free_ char *uid_map = NULL, *gid_map = NULL; - _cleanup_close_pair_ int errno_pipe[2] = PIPE_EBADF; + _cleanup_close_pair_ int errno_pipe[2] = EBADF_PAIR; _cleanup_close_ int unshare_ready_fd = -EBADF; _cleanup_(sigkill_waitp) pid_t pid = 0; uint64_t c = 1; @@ -3906,7 +3906,7 @@ int exec_invoke( _cleanup_free_ int *fds = NULL; _cleanup_strv_free_ char **fdnames = NULL; - int socket_fd = -EBADF, named_iofds[3] = { -EBADF, -EBADF, -EBADF }, *params_fds = NULL; + int socket_fd = -EBADF, named_iofds[3] = EBADF_TRIPLET, *params_fds = NULL; size_t n_storage_fds = 0, n_socket_fds = 0; assert(command); |