From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23157 invoked by alias); 1 Dec 2005 13:16:01 -0000 Received: (qmail 23148 invoked by uid 22791); 1 Dec 2005 13:16:00 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.202) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 01 Dec 2005 13:15:55 +0000 Received: by zproxy.gmail.com with SMTP id r28so256161nza for ; Thu, 01 Dec 2005 05:15:54 -0800 (PST) Received: by 10.64.204.17 with SMTP id b17mr798474qbg; Thu, 01 Dec 2005 05:15:53 -0800 (PST) Received: by 10.64.151.12 with HTTP; Thu, 1 Dec 2005 05:15:53 -0800 (PST) Message-ID: Date: Thu, 01 Dec 2005 13:16:00 -0000 From: Daniel Juan To: Kenny Simpson Subject: Re: posix semaphores not working under gdb Cc: gdb@sourceware.org In-Reply-To: <20051201075511.62566.qmail@web34107.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051201075511.62566.qmail@web34107.mail.mud.yahoo.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00002.txt.bz2 You are right Kenny, if you look at the doc in NTPL: man 3p sem_wait The sem_trywait() and sem_wait() functions shall return zero if the calling process successfully performed the semaphore lock operation on the semaphore designated by sem.If the call was unsuccessful, the state of the semaphore shall be unchanged, and the function shall return a value of -1 and set errno to indicate the error. If you look at Linuxthreads man 3 sem_wait The sem_wait and sem_getvalue functions always return 0. Thanks On 12/1/05, Kenny Simpson wrote: > One thing that caused me some pain a while ago is the semaphore behaviora= l change in NPTL vs > LinuxThreads. Under LinuxThreads, sem_wait will never return until the s= emaphore is aquired. > With NPTL, sem_wait can return EINTR > ... and DOES when gdb attaches. > > The man pages in many distrubutions still have the old LinuxThreads docum= entation which explictly > states that sem_wait will not be affected by signals. > > Hope this helps... > -Kenny > > > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > -- Daniel Juan Boned e-mail: daniel(dot)juan(at)gmail.com