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

Diff of /monit/daemonize.c

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

revision 1.14 by chopp, Wed Aug 13 22:18:42 2003 UTC revision 1.15 by martinp, Tue Sep 9 17:41:55 2003 UTC
# Line 181  int kill_daemon(int sig) { Line 181  int kill_daemon(int sig) {
181  int exist_daemon() {  int exist_daemon() {
182    
183    pid_t pid;    pid_t pid;
   int kill_return= 0;  
184    
185    errno= 0;    errno= 0;
186    
187    if((pid= get_pid(Run.pidfile))) {    if( (pid= get_pid(Run.pidfile)) )
188        if( (getpgid(pid)) > -1 || (errno == EPERM) )
189      if((kill_return= getpgid(pid)) > 0 || errno == EPERM)        return( (int)pid );
   
       return ( (int)pid ) ;  
   
   }  
190        
191    return FALSE;    return(FALSE);
192    
193  }  }
194            

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

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