Branch: Tag:

1999-05-08

1999-05-08 19:36:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved error checking for accept().

Rev: server/base_server/roxen.pike:1.272

1:   /* -  * $Id: roxen.pike,v 1.271 1999/05/01 18:23:18 grubba Exp $ +  * $Id: roxen.pike,v 1.272 1999/05/08 19:36:02 grubba Exp $    *    * The Roxen Challenger main program.    *
7:    */      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.271 1999/05/01 18:23:18 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.272 1999/05/08 19:36:02 grubba Exp $";      object backend_thread;   
580:    switch(port->errno())    {    case 0: -  case 11: + #if constant(system.EAGAIN) +  case system.EAGAIN: + #endif /* constant(system.EAGAIN) */    return;    -  + #if constant(system.EMFILE) +  case system.EMFILE: + #endif /* constant(system.EMFILE) */ + #if constant(system.EBADF) +  case system.EBADF: + #endif /* constant(system.EBADF) */ +  report_fatal(LOCALE->out_of_sockets()); +  low_shutdown(-1); +  return; +     default:   #ifdef DEBUG    perror("Accept failed.\n");
591:   #endif   #endif /* DEBUG */    return; -  -  case 24: -  report_fatal(LOCALE->out_of_sockets()); -  low_shutdown(-1); -  return; +     }    }   #ifdef FD_DEBUG