This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: select() and signal's
"Boris V. Guzhov" wrote:
>
> I tried and it works. But there are some questions.
> Now pthread_kill() interrupts not only select(), but
> also sem_wait().
> As far as I know, the POSIX semaphores are a general and
> exclusive synchronization mechanism with a signal-cathing
> function. And their functions should not be interrupted by
> signals.
> In Linux inplementation pthread_kill() not interrupts
> the sem_wait().
>
> That's right?
My POSIX spec says explicitly "The sem_wait() function shall be
interruptible by the delivery of a signal." So if signals on Linux never
interrupt it, it sounds like Linux is wrong(!)
On doing so, sem_wait should return -1 and set errno to EINTR.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine