Project

General

Profile

Actions

Backport #7134

closed

Signal handling bug in Mac OS X

Added by auastro (Andy Kitchen) over 9 years ago. Updated 11 days ago.

Status:
Closed
Priority:
Normal
[ruby-core:47880]

Description

On Mac OS X, running the attached program causes the exception below about 1/10 times it is run.

$ ruby hup.rb
hup.rb:2:in write': deadlock; recursive locking (ThreadError) from hup.rb:2:in puts'
from hup.rb:2:in puts' from hup.rb:2:in block in '
from hup.rb:6:in call' from hup.rb:6:in write'
from hup.rb:6:in puts' from hup.rb:6:in puts'
from hup.rb:6:in `'

The expected output is:

In Hup Handler
Finished...

or

Finished...
In Hup Handler

My ruby is compiled with clang:

$ clang --version
Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix


Files

hup.rb (94 Bytes) hup.rb execution of this script causes strange behaviour auastro (Andy Kitchen), 10/10/2012 05:36 PM
mutex_notrap.patch (4.32 KB) mutex_notrap.patch kosaki (Motohiro KOSAKI), 11/06/2012 04:40 AM
Actions

Also available in: Atom PDF