Whoops! That was dumb.
I put in the '1' and I also took out the WNOHANG since, as you point out, it isn't needed here. (I just copied from my signal handler, where it is desirable.)
Now it seems to work completely as expected. I'm still curious as to why the signal handler has this wierd behavior, but I'm guessing the answer is that the docs that claim that post-5.7.3 has safely reentrant signal handling are not quite correct.
Thanks!
In reply to Re^4: $? is -1???
by kscaldef
in thread $? is -1???
by kscaldef
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |