From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9351 invoked by alias); 17 Jun 2014 18:56:31 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 9325 invoked by uid 48); 17 Jun 2014 18:56:27 -0000 From: "bugdal at aerifal dot cx" To: glibc-bugs@sourceware.org Subject: [Bug nptl/14484] sem_timedwait always return -1 with errno 110 (ETIMEDOUT). Date: Tue, 17 Jun 2014 18:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nptl X-Bugzilla-Version: 2.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bugdal at aerifal dot cx X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg01212.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=14484 --- Comment #17 from Rich Felker --- Rereading the comments thread, I finally understand what the reporter's misunderstanding is. He seems to think ETIMEDOUT is ONLY for the case where the abstime passed to sem_timedwait is _already_ in the past at the time of the call, and that something else (EINTR?) should happen if sem_timedwait successfully begins waiting but then times out. This expectation is simply wrong. ETIMEDOUT is the correct error for both cases (and of course formally they are not demonstrably different since it's not observable whether a thread has actually entered the sem_timedwait or delayed prior to entry to the function due to scheduling). -- You are receiving this mail because: You are on the CC list for the bug.