Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262050AbTK1HSf (ORCPT ); Fri, 28 Nov 2003 02:18:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262051AbTK1HSf (ORCPT ); Fri, 28 Nov 2003 02:18:35 -0500 Received: from louise.pinerecords.com ([213.168.176.16]:13225 "EHLO louise.pinerecords.com") by vger.kernel.org with ESMTP id S262050AbTK1HSe (ORCPT ); Fri, 28 Nov 2003 02:18:34 -0500 Date: Fri, 28 Nov 2003 08:18:12 +0100 From: Tomas Szepe To: Linus Torvalds Cc: "Richard B. Johnson" , Linux kernel , Andries.Brouwer@cwi.nl Subject: Re: BUG (non-kernel), can hurt developers. Message-ID: <20031128071812.GA28728@louise.pinerecords.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1216 Lines: 33 On Nov-26 2003, Wed, 10:29 -0800 Linus Torvalds wrote: > You can't just randomly use library functions in signal handlers. You can > only use a very specific "signal-safe" set. > > POSIX lists that set in 3.3.1.3 (3f), and says > > "All POSIX.1 functions not in the preceding table and all > functions defined in the C standard {2} not stated to be callable > from a signal-catching function are considered to be /unsafe/ > with respect to signals. .." > > typos mine. > > The thing is, they have internal state that makes then non-reentrant (and > note that even the re-entrant ones might not be signal-safe, since they > may have deadlock issues: being thread-safe is _not_ the same as being > signal-safe). I believe it would be very useful to have this information included in the standard Linux signal(2) manpage. (I've just verified it's not in man-pages-1.60.) What do you think, Andries? -- Tomas Szepe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/