<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Martin McClure</b> <span dir="ltr">&lt;<a href="mailto:martin@hand2mouse.com">martin@hand2mouse.com</a>&gt;</span><br>
Date: 2014/1/13<br>Subject: Re: [Pharo-dev] Pharo 3.0 not responding to mouse or keyboard after launch<br>To: Pharo Development List &lt;<a href="mailto:pharo-dev@lists.pharo.org">pharo-dev@lists.pharo.org</a>&gt;<br><br>
<br><div class="im">On 01/12/2014 10:18 PM, Hernán Morales Durand wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That sounds really weird. Having to launch from GUI to start a working<br>
image is not very convenient.<br>
Let us know if you have any other findings.<br>
</blockquote>
<br></div>
Thanks. After some digging, I think I&#39;ve got it.<br>
<br>
The pharo executable is launched by the bash shell via a fork followed by an execve. The signal mask is inherited from the parent process, and preserved across the execve. Pharo does not modify the signal mask except once:<br>

<br>
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0<br>
<br>
which only appears to deal with one real-time signal.<br>
<br>
In my case, somehow one set of shells has SIGALRM masked, and another set of shells does not have it masked. Pharo seems to rely on SIGALRMs from the interval timer to wake it up periodically (every 2 ms) presumably to see whether it has any work to do.<br>

<br>
So no SIGALRMS delivered, not much happens.<br>
<br>
I have no idea why my shells are masking various signals, but it seems clear that it would be a good idea for the VM to initialize its signal mask explicitly rather than depending on the parent process to have it set sanely.<br>

<br>
So I count this one as a VM bug. If someone better connected with the VM community would report it as such, I&#39;d appreciate it.<br>
<br>
Thanks for all the suggestions while I dug to the bottom of this one.<br>
<br>
Regards,<br>
<br>
-Martin<br>
<br>
</div><br></div>