/[monit]/monit/validate.c
ViewVC logotype

Diff of /monit/validate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.50 by hauk, Wed Jul 16 02:20:25 2003 UTC revision 1.51 by hauk, Wed Jul 16 20:29:28 2003 UTC
# Line 415  static int check_process(Service_T s, Pr Line 415  static int check_process(Service_T s, Pr
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);
# Line 557  static int check_process_state(Service_T Line 558  static int check_process_state(Service_T
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)
# Line 565  static int check_process_state(Service_T Line 566  static int check_process_state(Service_T
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        

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26