Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 19 Apr 2001 13:59:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 19 Apr 2001 13:59:09 -0400 Received: from neon-gw.transmeta.com ([209.10.217.66]:49166 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Thu, 19 Apr 2001 13:59:01 -0400 To: linux-kernel@vger.kernel.org From: torvalds@transmeta.com (Linus Torvalds) Subject: Re: Children first in fork Date: 19 Apr 2001 10:58:45 -0700 Organization: A poorly-installed InterNetNews site Message-ID: <9bn90l$anp$1@penguin.transmeta.com> In-Reply-To: <20010419133538.A28654@quatramaran.ens.fr> <200104191256.OAA31141@quatramaran.ens.fr> <9bn3sr$fer$1@picard.cistron.nl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org In article <9bn3sr$fer$1@picard.cistron.nl>, Wichert Akkerman wrote: > >What you can do is what strace does: insert a loop instruction after >the fork or clone call and remove that when the call returns. You're probably even better off just intercepting the fork, turning it into a clone, and setting the CLONE_PTRACE option. Which (together with tracing the parent, which you will obviously be doing already in order to do all this in the first place) will nicely cause the child to get an automatic SIGSTOP _and_ be already traced. Not that I've tested it myself. Linus - 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/