This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: threads/1585: pthread_create generates notify to semaphore when run under gdb


The following reply was made to PR threads/1585; it has been noted by GNATS.

From: Michael Chastain <mec.gnu@mindspring.com>
To: gdb-gnats@sources.redhat.com, bbr@lampreynetworks.com
Cc:  
Subject: Re: threads/1585: pthread_create generates notify to semaphore when 
 run under gdb
Date: Sat, 28 Aug 2004 11:37:23 -0400

 The man page does not match what sem_wait actually does.
 
 Like almost every other system call in the linux kernel, sem_wait can
 return EINTR if a signal arrives during the wait time.
 
 This behavior is explicitly allowed by the single unix specification,
 version 3.
 
 http://www.opengroup.org/onlinepubs/009695399/functions/sem_wait.html
 
 The gotcha is that when a program runs under gdb, it receives more
 signals than when it does not run under gdb.  And yes, this is
 surprising and annoying.
 
 See the section "Thread Stops" in the gdb manual (gdb 6.1 or later)
 for a detailed explanation of this.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]