From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29791 invoked by alias); 1 Feb 2009 21:14:28 -0000 Received: (qmail 29772 invoked by uid 48); 1 Feb 2009 21:14:19 -0000 Date: Sun, 01 Feb 2009 21:14:00 -0000 Message-ID: <20090201211419.29771.qmail@sourceware.org> From: "kkylheku at gmail dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20090131031846.9804.kkylheku@gmail.com> References: <20090131031846.9804.kkylheku@gmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug nptl/9804] pthread_exit from main thread: poor semantics, potential tty session lockup. X-Bugzilla-Reason: CC 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 X-SW-Source: 2009-02/txt/msg00001.txt.bz2 ------- Additional Comments From kkylheku at gmail dot com 2009-02-01 21:14 ------- I now have a kernel patch that solves this for me. I modified the sys_exit system call to cause the parent thread to wait for all the other threads to die. If, while waiting, the parent thread gets a non- fatal signal, it returns -ERESTARTSYS. I.e. it's returning from sys_exit, which normally does not happen. This allows the signal handling to be done and sys_exit to be restarted. If a fatal signal happens, then the exit goes through. This appears to be working perfectly for me. I can now suspend and resume the process even if the main thread has already terminated with pthread_exit. All of the threads suspend and resume properly. There is no hang. I am marking this bug WONTFIX, because it's positively, definitely a kernel problem that requires no glibc changes. The kernel is simply not doing its part in supporting the semantics of pthread_exit from the primary thread. Cheers. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX http://sourceware.org/bugzilla/show_bug.cgi?id=9804 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.