From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: "Boris V. Guzhov" Cc: ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] select() and signal's Date: Mon, 23 Apr 2001 12:32:00 -0000 Message-id: <3AE48362.4B5C2E38@redhat.com> References: <01b701c0c996$c29891f0$7601a8c0@borg> <3AE0404E.B3BE865C@redhat.com> <01f801c0c9ab$be16cdd0$7601a8c0@borg> <3AE097E4.54468B43@redhat.com> <006401c0ca63$1bd96920$7601a8c0@borg> X-SW-Source: 2001-04/msg00337.html "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