mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Removed unused job_t * parameter from setup_child_process
This commit is contained in:
parent
628db65504
commit
dabe718c52
3 changed files with 6 additions and 6 deletions
|
@ -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
|
// 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
|
// 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.
|
// 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".
|
// 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);
|
const env_var_t shlvl_str = env_get(L"SHLVL", ENV_GLOBAL | ENV_EXPORT);
|
||||||
wcstring nshlvl_str = L"0";
|
wcstring nshlvl_str = L"0";
|
||||||
|
@ -893,7 +893,7 @@ void exec_job(parser_t &parser, job_t *j) {
|
||||||
if (block_child) {
|
if (block_child) {
|
||||||
kill(p->pid, SIGSTOP);
|
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);
|
exec_write_and_exit(block_output_io_buffer->fd, buffer, count, status);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1026,7 +1026,7 @@ void exec_job(parser_t &parser, job_t *j) {
|
||||||
if (block_child) {
|
if (block_child) {
|
||||||
kill(p->pid, SIGSTOP);
|
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);
|
do_builtin_io(outbuff, outbuff_len, errbuff, errbuff_len);
|
||||||
exit_without_destructors(p->status);
|
exit_without_destructors(p->status);
|
||||||
|
@ -1123,7 +1123,7 @@ void exec_job(parser_t &parser, job_t *j) {
|
||||||
if (block_child) {
|
if (block_child) {
|
||||||
kill(p->pid, SIGSTOP);
|
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(p, actual_cmd, argv, envv);
|
||||||
// safe_launch_process _never_ returns...
|
// safe_launch_process _never_ returns...
|
||||||
|
|
|
@ -260,7 +260,7 @@ static int handle_child_io(const io_chain_t &io_chain) {
|
||||||
return 0;
|
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;
|
bool ok = true;
|
||||||
|
|
||||||
if (ok) {
|
if (ok) {
|
||||||
|
|
|
@ -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.
|
/// \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.
|
/// 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
|
/// 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
|
/// doesn't do anything that could allocate memory, take a lock, etc. (like call exec), then it's
|
||||||
|
|
Loading…
Reference in a new issue