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

Diff of /monit/util.c

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

revision 1.56 by hauk, Fri Feb 28 23:00:29 2003 UTC revision 1.57 by chopp, Fri Jun 6 09:31:16 2003 UTC
# Line 715  pid_t get_pid(char *pidfile) { Line 715  pid_t get_pid(char *pidfile) {
715  int is_process_running(Process_T p) {  int is_process_running(Process_T p) {
716        
717    pid_t  pid;    pid_t  pid;
   int kill_return= 0;  
718    
719    ASSERT(p);    ASSERT(p);
720        
# Line 723  int is_process_running(Process_T p) { Line 722  int is_process_running(Process_T p) {
722    
723    if((pid= get_pid(p->pidfile))) {    if((pid= get_pid(p->pidfile))) {
724            
725      if((kill_return= getpgid(pid)) > 0 || errno == EPERM)  #ifdef AIX
726    
727        /* Comment by Richard Schwaninger <risc@vmilch.at>: */
728        /* hmm. I get getpgid== -1 and errno==0 sometimes... */
729    
730        if(( getpgid(pid)>0 ) || ( errno == EPERM ) || ( errno == 0 ))
731        
732          return pid;
733    
734    #else
735    
736        if(( getpgid(pid) > 0 ) || ( errno == EPERM ))
737                    
738        return pid;        return pid;
739            
740    #endif
741    
742    }    }
743    
744    
745    memset(p->procinfo, 0, sizeof *(p->procinfo));    memset(p->procinfo, 0, sizeof *(p->procinfo));
746    
747    return FALSE;    return FALSE;

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

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