From dabe718c52f498f43e6dfc5c0e292cae2f7fd2b2 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Sat, 29 Jul 2017 16:49:26 -0500 Subject: [PATCH] Removed unused job_t * parameter from setup_child_process --- src/exec.cpp | 8 ++++---- src/postfork.cpp | 2 +- src/postfork.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/exec.cpp b/src/exec.cpp index 89d24f06a..918d98fa3 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -412,7 +412,7 @@ void exec_job(parser_t &parser, job_t *j) { // It's known to be wrong - for example, it means that redirections bound for subsequent // commands in the pipeline will apply to exec. However, using exec in a pipeline doesn't // really make sense, so I'm not trying to fix it here. - if (!setup_child_process(j, 0, all_ios)) { + if (!setup_child_process(0, all_ios)) { // Decrement SHLVL as we're removing ourselves from the shell "stack". const env_var_t shlvl_str = env_get(L"SHLVL", ENV_GLOBAL | ENV_EXPORT); wcstring nshlvl_str = L"0"; @@ -893,7 +893,7 @@ void exec_job(parser_t &parser, job_t *j) { if (block_child) { kill(p->pid, SIGSTOP); } - setup_child_process(j, p, process_net_io_chain); + setup_child_process(p, process_net_io_chain); exec_write_and_exit(block_output_io_buffer->fd, buffer, count, status); } else { @@ -1026,7 +1026,7 @@ void exec_job(parser_t &parser, job_t *j) { if (block_child) { kill(p->pid, SIGSTOP); } - setup_child_process(j, p, process_net_io_chain); + setup_child_process(p, process_net_io_chain); do_builtin_io(outbuff, outbuff_len, errbuff, errbuff_len); exit_without_destructors(p->status); @@ -1123,7 +1123,7 @@ void exec_job(parser_t &parser, job_t *j) { if (block_child) { kill(p->pid, SIGSTOP); } - setup_child_process(j, p, process_net_io_chain); + setup_child_process(p, process_net_io_chain); safe_launch_process(p, actual_cmd, argv, envv); // safe_launch_process _never_ returns... diff --git a/src/postfork.cpp b/src/postfork.cpp index 2973942ac..b0afec96b 100644 --- a/src/postfork.cpp +++ b/src/postfork.cpp @@ -260,7 +260,7 @@ static int handle_child_io(const io_chain_t &io_chain) { return 0; } -int setup_child_process(job_t *j, process_t *p, const io_chain_t &io_chain) { +int setup_child_process(process_t *p, const io_chain_t &io_chain) { bool ok = true; if (ok) { diff --git a/src/postfork.h b/src/postfork.h index a90fd377b..4a3b47e4e 100644 --- a/src/postfork.h +++ b/src/postfork.h @@ -33,7 +33,7 @@ bool child_set_group(job_t *j, process_t *p); //called by child /// /// \return 0 on sucess, -1 on failiure. When this function returns, signals are always unblocked. /// On failiure, signal handlers, io redirections and process group of the process is undefined. -int setup_child_process(job_t *j, process_t *p, const io_chain_t &io_chain); +int setup_child_process(process_t *p, const io_chain_t &io_chain); /// Call fork(), optionally waiting until we are no longer multithreaded. If the forked child /// doesn't do anything that could allocate memory, take a lock, etc. (like call exec), then it's