UNIXServer.for_fd doesn't work
------------------------------

                 Key: JRUBY-4099
                 URL: http://jira.codehaus.org/browse/JRUBY-4099
             Project: JRuby
          Issue Type: Bug
          Components: Extensions
         Environment: Mac OS X Leopard
            Reporter: Hongli Lai
         Attachments: 
0001-Make-UNIXServer.for_fd-work.-It-accepts-a-native-fil.patch

UNIXServer.for_fd doesn't work. Suppose that we have the following script which 
we run in MRI:

require 'socket'
File.unlink('test.sock') rescue nil
socket = UNIXServer.new('test.sock')
puts "Fileno = #{socket.fileno}"
system("jirb -rsocket")

In the resulting jirb console we type:

UNIXServer.for_fd(...number that the above script printed...)

jirb currently throws an exception.

The attached patch fixes this problem: UNIXServer will accept a native file 
descriptor as argument. However I'm not sure how to write a unit test for this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to