mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Minor cleanup and const correctness
This commit is contained in:
parent
2b0c54dfc8
commit
cbff87fe17
4 changed files with 4 additions and 4 deletions
|
@ -133,7 +133,7 @@ bool set_child_group(job_t *j, pid_t child_pid) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool maybe_assign_terminal(job_t *j) {
|
||||
bool maybe_assign_terminal(const job_t *j) {
|
||||
assert(j->pgid > 1 && "maybe_assign_terminal() called on job with invalid pgid!");
|
||||
|
||||
if (j->get_flag(JOB_TERMINAL) && j->get_flag(JOB_FOREGROUND)) { //!OCLINT(early exit)
|
||||
|
|
|
@ -20,7 +20,7 @@ class process_t;
|
|||
|
||||
bool set_child_group(job_t *j, pid_t child_pid); // called by parent
|
||||
bool child_set_group(job_t *j, process_t *p); // called by child
|
||||
bool maybe_assign_terminal(job_t *j);
|
||||
bool maybe_assign_terminal(const job_t *j);
|
||||
|
||||
/// Initialize a new child process. This should be called right away after forking in the child
|
||||
/// process. If job control is enabled for this job, the process is put in the process group of the
|
||||
|
|
|
@ -779,7 +779,7 @@ static void read_try(job_t *j) {
|
|||
/// \param j The job to give the terminal to.
|
||||
/// \param cont If this variable is set, we are giving back control to a job that has previously
|
||||
/// been stopped. In that case, we need to set the terminal attributes to those saved in the job.
|
||||
bool terminal_give_to_job(job_t *j, int cont) {
|
||||
bool terminal_give_to_job(const job_t *j, bool cont) {
|
||||
errno = 0;
|
||||
if (j->pgid == 0) {
|
||||
debug(2, "terminal_give_to_job() returning early due to no process group");
|
||||
|
|
|
@ -372,4 +372,4 @@ pid_t proc_wait_any();
|
|||
|
||||
#endif
|
||||
|
||||
bool terminal_give_to_job(job_t *j, int cont);
|
||||
bool terminal_give_to_job(const job_t *j, bool cont);
|
||||
|
|
Loading…
Reference in a new issue