From owner-freebsd-bugs Tue Dec 29 15:30:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA27788 for freebsd-bugs-outgoing; Tue, 29 Dec 1998 15:30:11 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA27781 for ; Tue, 29 Dec 1998 15:30:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id PAA06810; Tue, 29 Dec 1998 15:30:01 -0800 (PST) Received: from cantor.boolean.net (cantor.boolean.net [209.133.111.73]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA27609 for ; Tue, 29 Dec 1998 15:29:26 -0800 (PST) (envelope-from kurt@cantor.boolean.net) Received: (from kurt@localhost) by cantor.boolean.net (8.9.1/8.9.1) id XAA71782; Tue, 29 Dec 1998 23:30:55 GMT (envelope-from kurt) Message-Id: <199812292330.XAA71782@cantor.boolean.net> Date: Tue, 29 Dec 1998 23:30:55 GMT From: Kurt Zeilenga Reply-To: kurt@boolean.net To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: i386/9237: pthread_exit doesn't exit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 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