From: Ville Mattila Date: 2001-11-19T16:50:12+09:00 Subject: [ruby-talk:25824] Re: BUG? Solaris select or poll does not recover correctly when signaled It's me again. I changed signal.c:posix_signal like this #ifdef SA_RESTART if (signum != SIGVTALRM) { sigact.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */ } #endif And now truss output is setcontext(0xFFBEAAC0) 16128: Received signal #28, SIGVTALRM [caught] 16128: setcontext(0xFFBEAAC0) 16128: Received signal #28, SIGVTALRM, in poll() [caught] 16128: poll(0xFFBEA8B8, 1, 480000) Err#4 EINTR 16128: fd=4 ev=POLLRDNORM rev=0x4057 16128: setcontext(0xFFBEA5A0) I.e. poll returns EINTR. 16128: write(2, " r b _ t h r e a d _ s e".., 23) = 23 16128: write(2, " 2 2", 2) = 2 but why the heck the select in rb_thread_select still sets errno to EINVAL? I'm really really confused. 16128: write(2, " i n S E L E C T\n", 11) = 11 16128: sigprocmask(SIG_SETMASK, 0x000BD2F0, 0x00000000) = 0 16128: set = 0 0 0 0 16128: write(1, " I n v a l i d a r g u".., 17) = 17