JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-5876

Socket#syswrite (the non-buffered one) raises SystemCallError on broken pipe

    Details

    • Number of attachments :
      1

      Description

      Both Socket#write and Socket#syswrite raise Errno::EPIPE on a broken pipe, but JRuby raises a SystemCallError for Socket#syswrite. The exception on a broken pipe for the buffered write (Socket#write) is correct. This behavior can be reproduced with the attached script.

        Activity

        Hide
        Charles Oliver Nutter added a comment -
        commit 353fea102ba24725fbc62b9ea2c18725c947ce98
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Mon Mar 12 18:08:16 2012 -0500
        
            Fix JRUBY-5876
            
            Socket#syswrite (the non-buffered one) raises SystemCallError on broken pipe
            
            Not the prettiest fix, but it's hard to get a better one when JDK
            hides the actual errors behind IOException.
        
        commit 2548a1e3ce9ef31bad95737be8f262a335500e42
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Mon Mar 12 18:13:12 2012 -0500
        
            Test for JRUBY-5876.
        
        Show
        Charles Oliver Nutter added a comment - commit 353fea102ba24725fbc62b9ea2c18725c947ce98 Author: Charles Oliver Nutter <headius@headius.com> Date: Mon Mar 12 18:08:16 2012 -0500 Fix JRUBY-5876 Socket#syswrite (the non-buffered one) raises SystemCallError on broken pipe Not the prettiest fix, but it's hard to get a better one when JDK hides the actual errors behind IOException. commit 2548a1e3ce9ef31bad95737be8f262a335500e42 Author: Charles Oliver Nutter <headius@headius.com> Date: Mon Mar 12 18:13:12 2012 -0500 Test for JRUBY-5876.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Pieter Noordhuis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: