diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-11-15 09:21:53 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-11-15 09:21:53 -0500 |
commit | 8b312eb6553235c36f5483d4e46c5034dcc03ce2 (patch) | |
tree | e50343acd34d92cfb146068a78624568ab903a6e /src/exec.c | |
parent | cc7d66416b91e0972c1022d0a835804a63ab7ab1 (diff) | |
download | bfs-8b312eb6553235c36f5483d4e46c5034dcc03ce2.tar.xz |
xspawn: API tweaks
Diffstat (limited to 'src/exec.c')
-rw-r--r-- | src/exec.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -362,9 +362,7 @@ static int bfs_exec_spawn(const struct bfs_exec *execbuf) { return -1; } - if (bfs_spawn_setflags(&spawn, BFS_SPAWN_USE_PATH) != 0) { - goto fail; - } + spawn.flags |= BFS_SPAWN_USE_PATH; if (execbuf->wd_fd >= 0) { if (bfs_spawn_addfchdir(&spawn, execbuf->wd_fd) != 0) { @@ -374,7 +372,7 @@ static int bfs_exec_spawn(const struct bfs_exec *execbuf) { // Reset RLIMIT_NOFILE if necessary, to avoid breaking applications that use select() if (rlim_cmp(ctx->orig_nofile.rlim_cur, ctx->cur_nofile.rlim_cur) < 0) { - if (bfs_spawn_addsetrlimit(&spawn, RLIMIT_NOFILE, &ctx->orig_nofile) != 0) { + if (bfs_spawn_setrlimit(&spawn, RLIMIT_NOFILE, &ctx->orig_nofile) != 0) { goto fail; } } |