From owner-freebsd-threads@FreeBSD.ORG Thu Jun 8 06:25:11 2006 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 640CF16AC0F for ; Thu, 8 Jun 2006 03:40:29 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBED543D45 for ; Thu, 8 Jun 2006 03:40:28 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.13.4/8.13.3) with ESMTP id k583e9si006404; Thu, 8 Jun 2006 07:40:13 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Thu, 8 Jun 2006 07:40:09 +0400 (MSD) From: Maxim Konovalov To: Mikhail Teterin In-Reply-To: <200606071906.25776.mi+mx@aldan.algebra.com> Message-ID: <20060608073336.C6097@mp2.macomnet.net> References: <200606071906.25776.mi+mx@aldan.algebra.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: threads@freebsd.org Subject: Re: SIGINFO and pthreads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 06:25:16 -0000 Hi, On Wed, 7 Jun 2006, 19:06-0400, Mikhail Teterin wrote: > Hello! > > I have a program, which updates the user with its status upon > receiving a SIGINFO (like dump, cp, dd, and fsck do). The exact same > handler is installed for SIGUSR1 (TclX does not know about SIGINFO > and I needed to a Tcl script to interact with the program too). > > When I made the program multi-threaded, it stopped reacting to the > SIGINFO. It still reacts to the SIGUSR1, but completele ignores > SIGINFO now... > > If I disable the multi-threading, SIGINFO is processed again... > > What's special about SIGINFO and pthreads? Thanks! libpthread uses SIGINFO for dumping thread information to a file but looking over the code it seems it does allow to use SIGINFO to the app. Are you sure your signal handling is correct? Signal handling in pthreads programs is tricky, e.g. all threads share signal actions but each thread has a separate signal mask. -- Maxim Konovalov