From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18540 invoked by alias); 5 Dec 2007 19:42:15 -0000 Received: (qmail 18531 invoked by uid 22791); 5 Dec 2007 19:42:14 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Dec 2007 19:42:07 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 74AB498349 for ; Wed, 5 Dec 2007 19:42:05 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 4F0DE9833F for ; Wed, 5 Dec 2007 19:42:05 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1J008C-00012E-6k for gdb-patches@sourceware.org; Wed, 05 Dec 2007 14:42:04 -0500 Date: Wed, 05 Dec 2007 20:59:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [patch+rfc] Warn the user on forked-off child processes Message-ID: <20071205194204.GA3566@caradoc.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20071205192850.GA17442@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071205192850.GA17442@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00089.txt.bz2 On Wed, Dec 05, 2007 at 08:28:50PM +0100, Jan Kratochvil wrote: > Hi, > > some programs fork(2)-off a child process for some part of its run. It was > seen on the LMbench `bin/bw_mem' program. User sets a breakpoint which is > silently missed and nobody notices there were multiple processes being run. > > If you would set > set debug lin-lwp 1 > you would see a message > Detaching after fork from child process 11741. > but it is clear nobody runs with `set debug lin-lwp 1' set as default. > > I did put there at least a warning message giving advice there is a fork: > [Detaching after fork from child process 20372. (Try `set detach-on-fork off'.)] This message used to be printed; I disabled it because no one seemed to find it useful. cvs annotate linux-nat.c -> changed in large change at 1.36 -> annotate -r1.35 -> changed in localized change at 1.27 -> cvs log -r1.27: date: 2005/03/06 16:42:20; author: drow; state: Exp; lines: +14 -6 * linux-nat.c (child_follow_fork): Call target_terminal_ours before printing output. Use fprintf_unfiltered. Only print output when debugging. (The fprintf_unfiltered part of that seems to have been accidentally reverted later on.) I won't approve or reject this patch; please see if other maintainers find the message useful. -- Daniel Jacobowitz CodeSourcery