From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3396 invoked by alias); 26 Dec 2005 18:58:13 -0000 Received: (qmail 3369 invoked by uid 22791); 26 Dec 2005 18:58:12 -0000 X-Spam-Check-By: sourceware.org Received: from gandalf.inter.net.il (HELO gandalf.inter.net.il) (192.114.186.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 Dec 2005 18:58:12 +0000 Received: from nitzan.inter.net.il (nitzan.inter.net.il [192.114.186.20]) by gandalf.inter.net.il (MOS 3.7.1-GA) with ESMTP id HJN42761; Mon, 26 Dec 2005 20:57:33 +0200 (IST) Received: from HOME-C4E4A596F7 (IGLD-83-130-200-59.inter.net.il [83.130.200.59]) by nitzan.inter.net.il (MOS 3.7.2-GA) with ESMTP id CHI18624 (AUTH halo1); Mon, 26 Dec 2005 20:57:30 +0200 (IST) Date: Tue, 27 Dec 2005 15:40:00 -0000 Message-Id: From: Eli Zaretskii To: Mark Kettenis CC: msnyder@redhat.com, gdb-patches@sources.redhat.com, drow@false.org In-reply-to: <200512261533.jBQFXCwt001363@elgar.sibelius.xs4all.nl> (message from Mark Kettenis on Mon, 26 Dec 2005 16:33:12 +0100 (CET)) Subject: Re: [RFA] Linux Checkpoints, take 3 Reply-to: Eli Zaretskii References: <43AC7D2E.6020609@redhat.com> <200512261533.jBQFXCwt001363@elgar.sibelius.xs4all.nl> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00299.txt.bz2 > Date: Mon, 26 Dec 2005 16:33:12 +0100 (CET) > From: Mark Kettenis > CC: gdb-patches@sources.redhat.com, drow@false.org > > > + /* Now save the 'state' (file position) of all open file descriptors. > > + Unfortunately fork does not take care of that for us... */ > > Hmm, fork(2) clones it file descroptors but both file descriptors > refer to the same open file description. Nasty. Wonder whether it'd > be possible to copy the open file descriptorions too. `fork' does the equivalent of `dup', AFAIK, so it cannot copy the system file table entry to which those descriptors point. If it did copy the entries, redirection would stop working.