415 |
if(!(pid= is_process_running(s))) { |
if(!(pid= is_process_running(s))) { |
416 |
/* Reset the proc info object to prevent false data in the first run */ |
/* Reset the proc info object to prevent false data in the first run */ |
417 |
memset(s->procinfo, 0, sizeof *(s->procinfo)); |
memset(s->procinfo, 0, sizeof *(s->procinfo)); |
418 |
Event_post(s, EVENT_START, "Reason: Process is not running."); |
Event_post(s, EVENT_START, "Reason: Process '%s' is not running.\n", |
419 |
|
s->name); |
420 |
return FALSE; |
return FALSE; |
421 |
} else { |
} else { |
422 |
DEBUG("'%s' is running with pid %d\n", s->name, (int)pid); |
DEBUG("'%s' is running with pid %d\n", s->name, (int)pid); |
558 |
|
|
559 |
if(pi->status_flag & PROCESS_ZOMBIE) { |
if(pi->status_flag & PROCESS_ZOMBIE) { |
560 |
snprintf(report, STRLEN, |
snprintf(report, STRLEN, |
561 |
"process with pid %d is a zombie\n", pi->pid); |
"process with pid %d is a zombie", pi->pid); |
562 |
/* We do not check the process anymore if it's a zombie |
/* We do not check the process anymore if it's a zombie |
563 |
since such a process is (usually) unmanageable */ |
since such a process is (usually) unmanageable */ |
564 |
LOCK(Run.mutex) |
LOCK(Run.mutex) |
566 |
END_LOCK; |
END_LOCK; |
567 |
return FALSE; |
return FALSE; |
568 |
} else { |
} else { |
569 |
DEBUG("'%s' zombie check passed [status_flag=%04x]\n", |
DEBUG("'%s' zombie check passed [status_flag=%04x]", |
570 |
s->name, pi->status_flag); |
s->name, pi->status_flag); |
571 |
} |
} |
572 |
|
|