[crossfire] server stopping on SIGPIPE

Mark Wedel mwedel at sonic.net
Thu Mar 31 01:38:46 CST 2005


tchize wrote:
>
     
      Hello, i noticed the following problem when debugging some client code on cvs
     
     >
     
     
     >
     
      first, by default, cvs compilation of server does put a #define DEBUG on 
     
     >
     
      config.h. Am not sure this is a correct behaviour to activate debugging by 
     
     >
     
      default. This should be added by people wanting to debug their code.
     
     >
     
     
     >
     
      second, a test in init_signals() is deactivating signal interception on 
     
     >
     
      sigpipe. This is quite a problem as sigpipe is quite common to get in sockets 
     
     >
     
      manipulations
     
     >
     
     
     >
     
      third, if client crash during the setup process, the server tries to send 
     
     >
     
      datas to a disconnected client and does generate a sigpipe, which by default 
     
     >
     
      is not handled and make the server simply exist without a message.
     
     >
     
     
     >
     
     
     >
     
      I suggest either one of those 2 solutions (and i'll recommend both)
     
     >
     
     
     >
     
       - do not activate DEBUG by default in configure script
     
     >
     
       - do not exclude sigpipe handling in DEBUG mode (this is non sense imho)
     
     
  yes - that makes sense.  I imagine the not setting up signal handlers for 
sigpipe and others in debug mode was to allow better debugging.  That perhaps 
makes sense for everything but sigpipe, since sigpipe is a normal signal.



    
    


More information about the crossfire mailing list