Date: Tue, 29 Dec 1998 23:30:55 GMT From: Kurt Zeilenga <kurt@boolean.net> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: i386/9237: pthread_exit doesn't exit Message-ID: <199812292330.XAA71782@cantor.boolean.net>
next in thread | raw e-mail | index | archive | help
>Number: 9237 >Category: i386 >Synopsis: pthread_exit doesn't exit >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 29 15:30:01 PST 1998 >Last-Modified: >Originator: Kurt Zeilenga >Organization: OpenLDAP >Release: FreeBSD 3.0-CURRENT i386 >Environment: FreeBSD cantor.boolean.net 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Mon Dec 7 22:33:44 GMT 1998 kurt@cantor.boolean.net:/work/src/sys/compile/BOOLEAN i386 cvsup'ed on 7 Dec, running elf kernel and executables SMP >Description: Calling pthread_exit() from only (main) thread does not cause process to exit. >How-To-Repeat: #include <pthread.h> int main(int argc, char** argv) { pthread_exit( NULL ); /* not reachable */ return -2; } cc -o threadtest threadtest.c -pthread ./threadtest; echo $status Process will not exit until interrupted/killed. Top(1) shows process in 'select'. >Fix: Woraround: Keep track of number of active threads and have last thread exit with exit() instead of phtread_exit(). >Audit-Trail: >Unformatted: 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?199812292330.XAA71782>