Commit 98a3d3b1 authored by Daniel Jacobowitz's avatar Daniel Jacobowitz

Tweak has_stopped_jobs for use with debugging

parent 6a3354a9
......@@ -203,6 +203,17 @@ static inline int has_stopped_jobs(int pgrp)
for_each_task_pid(pgrp, PIDTYPE_PGID, p, l, pid) {
if (p->state != TASK_STOPPED)
continue;
/* If p is stopped by a debugger on a signal that won't
stop it, then don't count p as stopped. This isn't
perfect but it's a good approximation. */
if (unlikely (p->ptrace)
&& p->exit_code != SIGSTOP
&& p->exit_code != SIGTSTP
&& p->exit_code != SIGTTOU
&& p->exit_code != SIGTTIN)
continue;
retval = 1;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment