author | Florian Forster <octo@huhu.verplant.org> | |
Tue, 22 May 2007 15:54:54 +0000 (17:54 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 22 May 2007 15:54:54 +0000 (17:54 +0200) |
Conflicts:
src/processes.c
src/processes.c
1 | 2 | |||
---|---|---|---|---|
src/processes.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc src/processes.c
index 5a29236d8970bdac405775e939b1ca5bf41b4bf4,ccf1571f8ea6211e32defc2418a43212dff7826d..ff4012660dff3888c5cb28cfa75107da3c7ed8cf
--- 1/src/processes.c
--- 2/src/processes.c
+++ b/src/processes.c
ppid = atoi (fields[3]);
- if ((tasks = ps_read_tasks (pid)) == NULL)
- *state = fields[2][0];
-
- if (*state == 'Z')
- {
- ps->num_lwp = 0;
- ps->num_proc = 0;
- }
- else if ((tasks = ps_read_tasks (pid)) == NULL)
- {
- /* Kernel 2.4 or so */
- ps->num_lwp = 1;
- ps->num_proc = 1;
- }
++ *state = fields[2][0];
++
++ if (*state == 'Z')
+ {
- /* This happends for zombied, e.g. */
- DEBUG ("ps_read_tasks (%i) failed.", pid);
- *state = 'Z';
+ ps->num_lwp = 0;
+ ps->num_proc = 0;
+ }
++ else if ((tasks = ps_read_tasks (pid)) == NULL)
++ {
++ /* Kernel 2.4 or so */
++ ps->num_lwp = 1;
++ ps->num_proc = 1;
++ }
else
{
- *state = '\0';
ps->num_lwp = 0;
ps->num_proc = 1;
for (i = 0; tasks[i] != 0; i++)
tasks = NULL;
}
- /* Leave the rest at zero if this is only an LWP */
- /* Leave the rest at zero if this is only a zombi */
++ /* Leave the rest at zero if this is only a zombi */
if (ps->num_proc == 0)
{
- DEBUG ("This is only an LWP: pid = %i; name = %s;",
- DBG ("This is only a zombi: pid = %i; name = %s;",
++ DEBUG ("This is only a zombi: pid = %i; name = %s;",
pid, ps->name);
return (0);
}