Lines Matching refs:signal

8 #include <linux/signal.h>
9 #include <linux/sched/signal.h>
27 * not in the foreground, send a SIGTTOU. If the signal is blocked or
38 if (current->signal->tty != tty)
79 tty = p->signal->tty;
80 p->signal->tty = NULL;
109 if (current->signal->tty) {
111 current->signal->tty->name);
112 tty_kref_put(current->signal->tty);
114 put_pid(current->signal->tty_old_pgrp);
115 current->signal->tty = tty_kref_get(tty);
116 current->signal->tty_old_pgrp = NULL;
133 if (current->signal->leader &&
134 !current->signal->tty &&
163 tty = tty_kref_get(current->signal->tty);
183 * @exit_session: if non-zero, signal all foreground group processes
186 * Optionally, signal all processes in the foreground process group.
202 if (p->signal->tty == tty) {
203 p->signal->tty = NULL;
208 if (!p->signal->leader) {
214 put_pid(p->signal->tty_old_pgrp); /* A noop */
218 p->signal->tty_old_pgrp = get_pid(tty->pgrp);
254 * ->siglock is taken to protect ->signal/->sighand
256 * ->siglock is taken to protect ->signal/->sighand
262 if (!current->signal->leader)
283 old_pgrp = current->signal->tty_old_pgrp;
284 current->signal->tty_old_pgrp = NULL;
310 * current->signal->tty_old_pgrp in a race condition, and
311 * cause pid memleak. Release current->signal->tty_old_pgrp
315 put_pid(current->signal->tty_old_pgrp);
316 current->signal->tty_old_pgrp = NULL;
319 /* Now clear signal->tty under the lock */
350 * Takes ->siglock() when updating signal->tty
359 if (current->signal->leader && (task_session(current) == tty->session))
366 if (!current->signal->leader || current->signal->tty) {
450 * Locking: none. Reference to current->signal->tty is safe.
460 if (tty == real_tty && current->signal->tty != real_tty)
496 if (!current->signal->tty ||
497 (current->signal->tty != real_tty) ||
538 if (tty == real_tty && current->signal->tty != real_tty)
565 if (current->signal->tty != tty)