From nobody@FreeBSD.ORG Tue Apr  6 20:51:38 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 01BD514E93; Tue,  6 Apr 1999 20:51:37 -0700 (PDT)
Message-Id: <19990407035137.01BD514E93@hub.freebsd.org>
Date: Tue,  6 Apr 1999 20:51:37 -0700 (PDT)
From: bryant@cs.usm.maine.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: pthread_kill() doesn't deliver signals to threads in blocking syscall
X-Send-Pr-Version: www-1.0

>Number:         10992
>Category:       bin
>Synopsis:       pthread_kill() doesn't deliver signals to threads in blocking syscall
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr  6 20:50:00 PDT 1999
>Closed-Date:    Fri Dec 17 20:20:41 PST 1999
>Last-Modified:  Fri Dec 17 20:22:49 PST 1999
>Originator:     Nathan Bryant
>Release:        3.1-STABLE
>Organization:
>Environment:
FreeBSD area51.v-wave.com 3.1-STABLE FreeBSD 3.1-STABLE #0: Sat Apr  3 15:03:15 MST 1999     root@area51.v-wave.com:/usr/src/sys/compile/AREA51  i386
>Description:
pthread_kill() doesn't properly dispatch a signal to the specified
thread, if the thread is waiting for a blocking system call.
pthread_kill() will, however, set the pthread->interrupted flag and
set the thread's state to 'running.' The signal is not marked as
pending, however, and the signal handler won't be called. A second call
to pthread_kill() will then dispatch the signal, since the thread has
been marked 'running' by the first call.
>How-To-Repeat:
call pthread_kill() on another thread that is waiting for network I/O;
its signal handler won't be called.
>Fix:
bug can be worked around be calling pthread_kill() twice where it
should only have to be called once.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: deischen 
State-Changed-When: Fri Dec 17 03:54:23 PST 1999 
State-Changed-Why:  
This should be fixed in -current.  I'll wait a week or so, then 
close out the PR if I don't get any feedback. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: deischen 
State-Changed-When: Fri Dec 17 20:20:41 PST 1999 
State-Changed-Why:  
Originator gives permission to close PR.  Many thanks to Nathan Bryant 
for catching this bug. 
>Unformatted:
