Date: Mon, 18 Oct 1999 00:23:06 +0200 (CEST) From: ag@muc.de To: FreeBSD-gnats-submit@freebsd.org Subject: i386/14383: Probable bug in phtread_kill() (both RELENG_3 and CURRENT) ? Message-ID: <199910172223.AAA66637@ag-gw.muc.de>
next in thread | raw e-mail | index | archive | help
>Number: 14383
>Category: i386
>Synopsis: pthread_kill() does not call sighandler of specific thread
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 17 15:30:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Armin Gruner
>Release: FreeBSD 3.2-RELEASE i386
>Organization:
muc.de
>Environment:
Standard 3.2 RELEASE installation
(sources upgraded to RELENG_3 AND CURRENT,
source of pthreads did not change there)
>Description:
If using pthread_kill(), the signal handler is
not called, if the specific thread is e.g. sleep()ing.
Only EINTR is returned.
>How-To-Repeat:
Run /usr/src/lib/libc_r/test/sigsuspend.
The test will fail because the signal handler does
not get called that many times than expected.
>Fix:
(applies both to RELENG_3 and CURRENT)
If the thread which should be signalled is in
SLEEP_WAIT, SELECT_WAIT and similar states, *RECORD*
the signal in the sigpending mask, as done in other
states too:
Index: uthread_kill.c
===================================================================
RCS file: /usr/FreeBSD-CVS/src/lib/libc_r/uthread/uthread_kill.c,v
retrieving revision 1.5.2.3
diff -u -w -r1.5.2.3 uthread_kill.c
--- uthread_kill.c 1999/08/29 14:55:57 1.5.2.3
+++ uthread_kill.c 1999/10/17 21:19:08
@@ -109,11 +109,8 @@
/* Return the signal number: */
pthread->signo = sig;
- } else {
- /* Increment the pending signal count: */
- sigaddset(&pthread->sigpend,sig);
}
- break;
+ /* fallthrough */
default:
/* Increment the pending signal count: */
>Release-Note:
>Audit-Trail:
>Unformatted:
if this thread is sleeping (thread is only getting EINTR)
Class: sw-bug
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910172223.AAA66637>
