From: KOSAKI Motohiro Date: 2012-04-25T06:12:19+09:00 Subject: [ruby-core:44606] Re: [ruby-trunk - Bug #6341] SIGSEGV: Thread.new { fork { GC.start } }.join On Tue, Apr 24, 2012 at 2:25 PM, Eric Wong wrote: > KOSAKI Motohiro wrote: >> (4/24/12 6:55 AM), Yusuke Endoh wrote: >> >2012/4/24, KOSAKI Motohiro: >> >>Do you want raise NotImplementError on _all_ platform? >> > >> >My answer is yes, if the problem occurs actually. >> > >> >>So, one option is, fork after thread.new raise >> >>an exception on all platform. >> > >> >Looks good. >> >> okey. at first, I'd like to add a warnings and observe how much apps >> makes whiny. > > Shouldn't the presence of the GVL allow Thread.new + fork to be safe in > pure Ruby code? �Also, the async-signal-safe requirement for fork() may > be dropped in future versions of POSIX: > http://austingroupbugs.net/view.php?id=62 I think you misunderstand this URL. Currently fork() itself is one of async-signal-safe function (i.e. can be called from signal handler). but it shouldn't. Linux and any other OSs can implement it because we have pthead_atfork(), therefore austin plan to remove the lie statement. We still can't call async-signal-safe function after fork on multi-threads enviroment.