make style-all time again

Recent changes have introduced some style deviations so clean them up.
This commit is contained in:
Kurtis Rader
2017-08-06 16:05:51 -07:00
parent acdb81bbca
commit 975a5bfbde
10 changed files with 57 additions and 68 deletions

View File

@@ -119,15 +119,15 @@ bool child_set_group(job_t *j, process_t *p) {
return retval;
}
/// Called only by the parent only after a child forks and successfully calls child_set_group, guaranteeing
/// the job control process group has been created and that the child belongs to the correct process group.
/// Here we can update our job_t structure to reflect the correct process group in the case of JOB_CONTROL,
/// and we can give the new process group control of the terminal if it's to run in the foreground. Note that
/// we can guarantee the child won't try to read from the terminal before we've had a chance to run this code,
/// because we haven't woken them up with a SIGCONT yet.
/// This musn't be called as a part of setup_child_process because that can hang indefinitely until data is
/// available to read/write in the case of IO_FILE, which means we'll never reach our SIGSTOP and everything
/// hangs.
/// Called only by the parent only after a child forks and successfully calls child_set_group,
/// guaranteeing the job control process group has been created and that the child belongs to the
/// correct process group. Here we can update our job_t structure to reflect the correct process
/// group in the case of JOB_CONTROL, and we can give the new process group control of the terminal
/// if it's to run in the foreground. Note that we can guarantee the child won't try to read from
/// the terminal before we've had a chance to run this code, because we haven't woken them up with a
/// SIGCONT yet. This musn't be called as a part of setup_child_process because that can hang
/// indefinitely until data is available to read/write in the case of IO_FILE, which means we'll
/// never reach our SIGSTOP and everything hangs.
bool set_child_group(job_t *j, pid_t child_pid) {
bool retval = true;
@@ -148,9 +148,7 @@ bool set_child_group(job_t *j, pid_t child_pid) {
// a process group, attempting to call tcsetpgrp from the background will cause SIGTTOU
// to be sent to everything in our process group (unless we handle it).
debug(4, L"Process group %d already has control of terminal\n", j->pgid);
}
else
{
} else {
// No need to duplicate the code here, a function already exists that does just this.
retval = terminal_give_to_job(j, false /*new job, so not continuing*/);
}