This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Fri May 31 22:50:53 2024 Received: from entropy.muc.muohio.edu (IDENT:root@entropy.muc.muohio.edu [134.53.213.10]) by herbie.ucs.indiana.edu (8.9.3/8.9.3) with ESMTP id VAA19662 for ; Tue, 20 Jul 1999 21:17:32 -0500 (EST) Received: from vger.rutgers.edu (vger.rutgers.edu [128.6.190.2]) by entropy.muc.muohio.edu (8.8.7/8.8.7) with ESMTP id WAA18743; Tue, 20 Jul 1999 22:14:02 -0400 Received: by vger.rutgers.edu via listexpand id ; Tue, 20 Jul 1999 21:11:31 -0400 Received: by vger.rutgers.edu id ; Tue, 20 Jul 1999 21:10:57 -0400 Received: from adsl-206-170-148-147.dsl.snfc21.pacbell.net ([206.170.148.147]:63354 "HELO ixodes.goop.org") by vger.rutgers.edu with SMTP id ; Tue, 20 Jul 1999 21:10:35 -0400 Received: (qmail 14165 invoked by uid 223); 21 Jul 1999 01:10:33 -0000 Message-Id: X-Mailer: XFMail 1.3 [p0] on Linux X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Mime-Version: 1.0 In-Reply-To: <199907202312.SAA14284@isunix.it.ilstu.edu> Date: Tue, 20 Jul 1999 18:10:33 -0700 (PDT) From: Jeremy Fitzhardinge To: Tim Hockin Subject: Re: Patch: CLONE_PPID (was kernel thread support - LWP's) Cc: linux-kernel@vger.rutgers.edu Sender: owner-linux-kernel@vger.rutgers.edu Precedence: bulk X-Loop: majordomo@vger.rutgers.edu X-Orcpt: rfc822;linux-kernel-outgoing-dig On 20-Jul-99 Tim Hockin wrote: >> if (fork()) >> execl("unsuspecting program"); >> else >> { >> /* do things, exit when it's least expected */ >> } > > > how is that having a child it doesn't know about? exec replaces the > current process, not forks another. And even if it did fork, the third > task would be a child of the second, not the first. I don't follow you. The fork() in the example above creates a new child process. The exec starts a new program in the parent process, which has a pre-existing child. If the exec()ed program does wait()s, it will see the exit status for a child process it didn't know it had. There can be any number of forks in the parent process before the exec, so there can be any number of unexpected children. The only difference between this scenario and CLONE_PPID is that the former has to pre-create all the unexpected children, whereas CLONE_PPID create them after the exec(). J - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/