On Mon, Apr 23, 2012 at 11:17 PM, Yusuke Endoh <mame / tsg.ne.jp> wrote:
> Hello,
>
> 2012/4/24, kosaki (Motohiro KOSAKI) <kosaki.motohiro / gmail.com>:
>> I think this is a kind of documentation issue. If you use C, you can't use
>> both thread and fork. It's obvious.
>> And almost people think ruby naturally has the same limitation because ruby
>> is written by C. But rudolf implicitly
>> pointed out some people don't think so.
>
> No, this is not documentation issue.
> The easy code *actually* causes SEGV on the platform, doesn't it?

Any platform may cause SEGV on such code. In fact, it's not NetBSD specific.
Please think why thread+fork require async-signal-safe.

Do you want raise NotImplementError on _all_ platform?


> I'm against remaining such a significant problem and adding ad-hoc
> guards to the tests.
>
> I suggest to make Kernel#fork raise a NotImplementedError on NetBSD
> 5.0+.
> Fortunately, the tests already have a guard for NotImplementedError
> because there is a supported platform that does not support
> Kernel#fork (you know, windows).
> Even on the platform, SEGV is not allowed, in principle.

No. it works if user don't use threads. So, one option is, fork after
thread.new raise
an exception on all platform.


> Note, my suggestion is based on my uncertain guess about NetBSD 5.0+.
> I'm not even a user of NetBSD.      
> guess is correct.
> Kosaki-san, if you seriously want to support NetBSD, I'd like you to
> be a platform maintainer for NetBSD.

Nope. I'm not NetBSD user.