Removed unused job_t * parameter from setup_child_process

This commit is contained in:
Mahmoud Al-Qudsi 2017-07-29 16:49:26 -05:00 committed by Kurtis Rader
parent 628db65504
commit dabe718c52
3 changed files with 6 additions and 6 deletions

View file

@ -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...

View file

@ -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) {

View file

@ -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