Type the "process_status" interface properly
- and in implementation for linux-gnu, reflect that some kernels don't
distinguish job-control stop and tracing stop by different letter.
diff --git a/sysdeps/linux-gnu/trace.c b/sysdeps/linux-gnu/trace.c
index e678536..8efd284 100644
--- a/sysdeps/linux-gnu/trace.c
+++ b/sysdeps/linux-gnu/trace.c
@@ -214,19 +214,18 @@
static enum pcb_status
task_stopped(Process * task, void * data)
{
- int status;
-
/* If the task is already stopped, don't worry about it.
* Likewise if it managed to become a zombie or terminate in
* the meantime. This can happen when the whole thread group
* is terminating. */
- switch (status = process_status(task->pid))
- case -1:
- case 't':
- case 'Z':
+ switch (process_status(task->pid)) {
+ case ps_invalid:
+ case ps_tracing_stop:
+ case ps_zombie:
return pcb_cont;
-
- return pcb_stop;
+ default:
+ return pcb_stop;
+ }
}
static struct pid_task *