/[monit]/monit/http/engine.c
ViewVC logotype

Diff of /monit/http/engine.c

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

revision 1.36 by hauk, Wed Sep 17 18:07:26 2003 UTC revision 1.37 by martinp, Wed Sep 17 18:40:21 2003 UTC
# Line 476  static RequestWrapper socket_producer(in Line 476  static RequestWrapper socket_producer(in
476    
477    if(rv > 0) {    if(rv > 0) {
478    
     pthread_mutex_lock(&Run.mutex_fd);  
   
479      if( (client= accept(server, (struct sockaddr*)&in, &len)) < 0) {      if( (client= accept(server, (struct sockaddr*)&in, &len)) < 0) {
480    
       pthread_mutex_unlock(&Run.mutex_fd);  
   
481        if(stopped) {        if(stopped) {
482          log("http server: service stopped\n");          log("http server: service stopped\n");
483        }  else {        }  else {
# Line 492  static RequestWrapper socket_producer(in Line 488  static RequestWrapper socket_producer(in
488    
489      }      }
490    
     if(fcntl(client, F_SETFD, fcntl(client, F_GETFD) | FD_CLOEXEC) == -1) {  
       close(client);  
       pthread_mutex_unlock(&Run.mutex_fd);  
       return NULL;  
     }  
   
     pthread_mutex_unlock(&Run.mutex_fd);  
   
491    } else {    } else {
492    
493      /* in the case that timeout or error occured, return NULL to allow      /* in the case that timeout or error occured, return NULL to allow

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

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