On Tue, Apr 24, 2012 at 2:25 PM, Eric Wong <normalperson / yhbt.net> wrote:
> KOSAKI Motohiro <kosaki.motohiro / gmail.com> wrote:
>> (4/24/12 6:55 AM), Yusuke Endoh wrote:
>> >2012/4/24, KOSAKI Motohiro<kosaki.motohiro / gmail.com>:
>> >>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? =A0Also, the async-signal-safe requirement for fork() may
> be dropped in future versions of POSIX:
> http://austingroupbugs.net/view.php?id=3D62

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.