B
Bill Kelly
Hi,
I'm getting a deadlock on this small program, on both Windows
and Linux:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
require 'net/ftp'
Thread.abort_on_exception = true
ftp = Net::FTP.new('ftp.idsoftware.com')
p( Thread.new {$SAFE=4; ftp.login('anonymous', '(e-mail address removed)')}.value )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ruby -v ftp_safe_test.rb
ruby 1.8.4 (2005-12-24) [i386-mswin32]
ftp_safe_test.rb:4:in `value': Thread(0x27855c8): deadlock (fatal)
from ftp_safe_test.rb:4
$ ruby -v safe_ftp_test.rb
ruby 1.8.4 (2005-12-24) [i686-linux]
safe_ftp_test.rb:4:in `value': Thread(0x4f060748): deadlock (fatal)
from safe_ftp_test.rb:4
Now, I didn't necessarily expect the code to WORK at $SAFE=4,
but I was anticipating a SecurityError rather than a deadlock.
(I've tried it with Thread.abort_on_exception both true and
false, same result.)
Any thoughts?
Thanks,
Regards,
Bill
I'm getting a deadlock on this small program, on both Windows
and Linux:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
require 'net/ftp'
Thread.abort_on_exception = true
ftp = Net::FTP.new('ftp.idsoftware.com')
p( Thread.new {$SAFE=4; ftp.login('anonymous', '(e-mail address removed)')}.value )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ruby -v ftp_safe_test.rb
ruby 1.8.4 (2005-12-24) [i386-mswin32]
ftp_safe_test.rb:4:in `value': Thread(0x27855c8): deadlock (fatal)
from ftp_safe_test.rb:4
$ ruby -v safe_ftp_test.rb
ruby 1.8.4 (2005-12-24) [i686-linux]
safe_ftp_test.rb:4:in `value': Thread(0x4f060748): deadlock (fatal)
from safe_ftp_test.rb:4
Now, I didn't necessarily expect the code to WORK at $SAFE=4,
but I was anticipating a SecurityError rather than a deadlock.
(I've tried it with Thread.abort_on_exception both true and
false, same result.)
Any thoughts?
Thanks,
Regards,
Bill