diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-10-16 14:59:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 19:26:14 -0500 |
commit | e1c2296c3485158304bfad5a80e89078463d70c8 (patch) | |
tree | 98103d2003b9b478c60b8a546e4917880e2150e3 /kernel | |
parent | 2c411c11020ff356748268ca9cae4c1b4c410f00 (diff) |
tty: Move session_of_pgrp() and make static
tiocspgrp() is the lone caller of session_of_pgrp(); relocate and
limit to file scope.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 5d30019ff953..6a3e2e5004ba 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -215,27 +215,6 @@ repeat: | |||
215 | } | 215 | } |
216 | 216 | ||
217 | /* | 217 | /* |
218 | * This checks not only the pgrp, but falls back on the pid if no | ||
219 | * satisfactory pgrp is found. I dunno - gdb doesn't work correctly | ||
220 | * without this... | ||
221 | * | ||
222 | * The caller must hold rcu lock or the tasklist lock. | ||
223 | */ | ||
224 | struct pid *session_of_pgrp(struct pid *pgrp) | ||
225 | { | ||
226 | struct task_struct *p; | ||
227 | struct pid *sid = NULL; | ||
228 | |||
229 | p = pid_task(pgrp, PIDTYPE_PGID); | ||
230 | if (p == NULL) | ||
231 | p = pid_task(pgrp, PIDTYPE_PID); | ||
232 | if (p != NULL) | ||
233 | sid = task_session(p); | ||
234 | |||
235 | return sid; | ||
236 | } | ||
237 | |||
238 | /* | ||
239 | * Determine if a process group is "orphaned", according to the POSIX | 218 | * Determine if a process group is "orphaned", according to the POSIX |
240 | * definition in 2.2.2.52. Orphaned process groups are not to be affected | 219 | * definition in 2.2.2.52. Orphaned process groups are not to be affected |
241 | * by terminal-generated stop signals. Newly orphaned process groups are | 220 | * by terminal-generated stop signals. Newly orphaned process groups are |