-/*
- * kill_sl_info() sends a signal to the session leader: this is used
- * to send SIGHUP to the controlling process of a terminal when
- * the connection is lost.
- */
-
-
-int
-kill_sl_info(int sig, struct siginfo *info, pid_t sid)
-{
- int err, retval = -EINVAL;
- struct task_struct *p;
-
- if (sid <= 0)
- goto out;
-
- retval = -ESRCH;
- read_lock(&tasklist_lock);
- do_each_task_pid(sid, PIDTYPE_SID, p) {
- if (!p->signal->leader)
- continue;
- err = group_send_sig_info(sig, info, p);
- if (retval)
- retval = err;
- } while_each_task_pid(sid, PIDTYPE_SID, p);
- read_unlock(&tasklist_lock);
-out:
- return retval;
-}
-