diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-12-20 15:36:30 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-12-20 15:36:30 +0000 |
commit | 82986aad3d49f406fdeef7365bc050eb31d451fd (patch) | |
tree | d01ad22388856de3de4afec9d468d4fe2772d400 | |
parent | 5a26476c4303a93bfb9fa375ab6b78f36dd4233c (diff) | |
download | execline-82986aad3d49f406fdeef7365bc050eb31d451fd.tar.gz execline-82986aad3d49f406fdeef7365bc050eb31d451fd.tar.xz execline-82986aad3d49f406fdeef7365bc050eb31d451fd.zip |
env_mergen() should never fail, by policy
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r-- | src/execline/trap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/execline/trap.c b/src/execline/trap.c index 62526ed..ba1b25a 100644 --- a/src/execline/trap.c +++ b/src/execline/trap.c @@ -35,8 +35,7 @@ static inline void trap_action (unsigned int i, char const *const *envp, size_t memcpy(modif + m, "SIGNAL=", 7) ; m += 7 ; m += uint_fmt(modif + m, i) ; modif[m++] = 0 ; - if (!env_mergen(newenvp, envlen + 3, envp, envlen, modif, m, 2)) - strerr_diefu1sys(111, "adjust environment for child") ; + env_mergen(newenvp, envlen + 3, envp, envlen, modif, m, 2) ; pids[i] = cspawn(argvs[i][0], argvs[i], newenvp, CSPAWN_FLAGS_SELFPIPE_FINISH, 0, 0) ; if (!pids[i]) strerr_diefu2sys(111, "spawn ", argvs[i][0]) ; } |