[GHC] #1114: Socket code dies with SIGPIPE

GHC trac at galois.com
Tue Jan 23 07:36:26 EST 2007


#1114: Socket code dies with SIGPIPE
------------------------+---------------------------------------------------
 Reporter:  guest       |          Owner:         
     Type:  bug         |         Status:  new    
 Priority:  normal      |      Milestone:         
Component:  hslibs/net  |        Version:  6.6    
 Severity:  normal      |     Resolution:         
 Keywords:              |     Difficulty:  Unknown
 Testcase:              |   Architecture:  x86    
       Os:  Linux       |  
------------------------+---------------------------------------------------
Comment (by guest):

 From write (2) manpage:
  EPIPE
    fd is connected to a pipe or socket whose reading end is closed.
    When this happens the writing process will also receive  a  SIGPIPE
 signal.
    (Thus, the write return value is seen only if the
    program catches, blocks or ignores this signal.)

 and send (2) manpage:
  ssize_t send(int s, const void *buf, size_t len, int flags);
  [[BR]]...[[BR]]
  The flags parameter is the bitwise OR of zero or more of the  following
  flags.
  [[BR]]...[[BR]]
  MSG_NOSIGNAL
    Requests  not to send SIGPIPE on errors on stream oriented sockets when
    the other end breaks the connection. The EPIPE error is still returned.
  ...[[BR]]
  EPIPE
    The local end has  been  shut  down  on  a  connection  oriented
    socket.   In  this  case the process will also receive a SIGPIPE
    unless MSG_NOSIGNAL is set.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1114>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list