Lines Matching refs:pid
234 struct pid *session_of_pgrp(struct pid *pgrp) in session_of_pgrp()
237 struct pid *sid = NULL; in session_of_pgrp()
256 static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task) in will_become_orphaned_pgrp()
285 static int has_stopped_jobs(struct pid *pgrp) in has_stopped_jobs()
307 struct pid *pgrp = task_pgrp(tsk); in kill_orphaned_pgrp()
367 void __set_special_pids(struct pid *pid) in __set_special_pids() argument
370 pid_t nr = pid_nr(pid); in __set_special_pids()
372 if (task_session(curr) != pid) { in __set_special_pids()
373 change_pid(curr, PIDTYPE_SID, pid); in __set_special_pids()
376 if (task_pgrp(curr) != pid) { in __set_special_pids()
377 change_pid(curr, PIDTYPE_PGID, pid); in __set_special_pids()
382 static void set_special_pids(struct pid *pid) in set_special_pids() argument
385 __set_special_pids(pid); in set_special_pids()
1025 if (unlikely(!tsk->pid)) in do_exit()
1209 static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) in task_pid_type()
1211 struct pid *pid = NULL; in task_pid_type() local
1213 pid = task->pids[type].pid; in task_pid_type()
1215 pid = task->group_leader->pids[type].pid; in task_pid_type()
1216 return pid; in task_pid_type()
1219 static int eligible_child(enum pid_type type, struct pid *pid, int options, in eligible_child() argument
1225 if (task_pid_type(p, type) != pid) in eligible_child()
1245 static int wait_noreap_copyout(struct task_struct *p, pid_t pid, uid_t uid, in wait_noreap_copyout() argument
1260 retval = put_user(pid, &infop->si_pid); in wait_noreap_copyout()
1266 retval = pid; in wait_noreap_copyout()
1282 pid_t pid = task_pid_vnr(p); in wait_task_zombie() local
1301 return wait_noreap_copyout(p, pid, uid, why, in wait_task_zombie()
1407 retval = put_user(pid, &infop->si_pid); in wait_task_zombie()
1411 retval = pid; in wait_task_zombie()
1449 pid_t pid; in wait_task_stopped() local
1489 pid = task_pid_vnr(p); in wait_task_stopped()
1494 return wait_noreap_copyout(p, pid, uid, in wait_task_stopped()
1510 retval = put_user(pid, &infop->si_pid); in wait_task_stopped()
1514 retval = pid; in wait_task_stopped()
1532 pid_t pid; in wait_task_continued() local
1552 pid = task_pid_vnr(p); in wait_task_continued()
1562 retval = pid; in wait_task_continued()
1564 retval = wait_noreap_copyout(p, pid, uid, in wait_task_continued()
1584 enum pid_type type, struct pid *pid, int options, in wait_consider_task() argument
1588 int ret = eligible_child(type, pid, options, p); in wait_consider_task()
1645 enum pid_type type, struct pid *pid, int options, in do_wait_thread() argument
1657 type, pid, options, in do_wait_thread()
1668 enum pid_type type, struct pid *pid, int options, in ptrace_do_wait() argument
1681 type, pid, options, in ptrace_do_wait()
1690 static long do_wait(enum pid_type type, struct pid *pid, int options, in do_wait() argument
1698 trace_sched_process_wait(pid); in do_wait()
1708 if ((type < PIDTYPE_MAX) && (!pid || hlist_empty(&pid->tasks[type]))) in do_wait()
1716 type, pid, options, in do_wait()
1720 type, pid, options, in do_wait()
1777 struct pid *pid = NULL; in SYSCALL_DEFINE5() local
1805 pid = find_get_pid(upid); in SYSCALL_DEFINE5()
1806 ret = do_wait(type, pid, options, infop, NULL, ru); in SYSCALL_DEFINE5()
1807 put_pid(pid); in SYSCALL_DEFINE5()
1817 struct pid *pid = NULL; in SYSCALL_DEFINE4() local
1829 pid = find_get_pid(-upid); in SYSCALL_DEFINE4()
1832 pid = get_pid(task_pgrp(current)); in SYSCALL_DEFINE4()
1835 pid = find_get_pid(upid); in SYSCALL_DEFINE4()
1838 ret = do_wait(type, pid, options | WEXITED, NULL, stat_addr, ru); in SYSCALL_DEFINE4()
1839 put_pid(pid); in SYSCALL_DEFINE4()
1852 SYSCALL_DEFINE3(waitpid, pid_t, pid, int __user *, stat_addr, int, options) in SYSCALL_DEFINE3() argument
1854 return sys_wait4(pid, stat_addr, options, NULL); in SYSCALL_DEFINE3()