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

Diff of /monit/daemonize.c

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

revision 1.9 by hauk, Sat Dec 21 11:19:13 2002 UTC revision 1.10 by martinp, Mon Dec 30 15:25:30 2002 UTC
# Line 177  int kill_daemon() { Line 177  int kill_daemon() {
177  int exist_daemon() {  int exist_daemon() {
178    
179    pid_t pid;    pid_t pid;
180    struct myprocess d;    int kill_return= 0;
181      
182    d.pidfile= Run.pidfile;    errno= 0;
183    pid= is_process_running(&d);  
184      if((pid= get_pid(Run.pidfile))) {
185    
186        if((kill_return= getpgid(pid)) > 0 || errno == EPERM)
187    
188          return ( (int)pid ) ;
189    
190      }
191        
192    return ( (int)pid ) ;    return FALSE;
193    
194  }  }
195            

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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