Lines Matching full:signal
8 #include <linux/signal.h>
9 #include <linux/sched/signal.h>
26 * not in the foreground, send a SIGTTOU. If the signal is blocked or
37 if (current->signal->tty != tty) in __tty_check_change()
78 tty = p->signal->tty; in proc_clear_tty()
79 p->signal->tty = NULL; in proc_clear_tty()
108 if (current->signal->tty) { in __proc_set_tty()
110 current->signal->tty->name); in __proc_set_tty()
111 tty_kref_put(current->signal->tty); in __proc_set_tty()
113 put_pid(current->signal->tty_old_pgrp); in __proc_set_tty()
114 current->signal->tty = tty_kref_get(tty); in __proc_set_tty()
115 current->signal->tty_old_pgrp = NULL; in __proc_set_tty()
132 if (current->signal->leader && in tty_open_proc_set_tty()
133 !current->signal->tty && in tty_open_proc_set_tty()
162 tty = tty_kref_get(current->signal->tty); in get_current_tty()
182 * @exit_session: if non-zero, signal all foreground group processes
185 * Optionally, signal all processes in the foreground process group.
201 if (p->signal->tty == tty) { in tty_signal_session_leader()
202 p->signal->tty = NULL; in tty_signal_session_leader()
207 if (!p->signal->leader) { in tty_signal_session_leader()
213 put_pid(p->signal->tty_old_pgrp); /* A noop */ in tty_signal_session_leader()
217 p->signal->tty_old_pgrp = get_pid(tty->pgrp); in tty_signal_session_leader()
253 * ->siglock is taken to protect ->signal/->sighand
255 * ->siglock is taken to protect ->signal/->sighand
261 if (!current->signal->leader) in disassociate_ctty()
282 old_pgrp = current->signal->tty_old_pgrp; in disassociate_ctty()
283 current->signal->tty_old_pgrp = NULL; in disassociate_ctty()
294 put_pid(current->signal->tty_old_pgrp); in disassociate_ctty()
295 current->signal->tty_old_pgrp = NULL; in disassociate_ctty()
296 tty = tty_kref_get(current->signal->tty); in disassociate_ctty()
313 /* Now clear signal->tty under the lock */ in disassociate_ctty()
344 * Takes ->siglock() when updating signal->tty
353 if (current->signal->leader && (task_session(current) == tty->session)) in tiocsctty()
360 if (!current->signal->leader || current->signal->tty) { in tiocsctty()
444 * Locking: none. Reference to current->signal->tty is safe.
454 if (tty == real_tty && current->signal->tty != real_tty) in tiocgpgrp()
490 if (!current->signal->tty || in tiocspgrp()
491 (current->signal->tty != real_tty) || in tiocspgrp()
532 if (tty == real_tty && current->signal->tty != real_tty) in tiocgsid()
559 if (current->signal->tty != tty) in tty_jobctrl_ioctl()