From: "Paul Menage" Subject: Re: [Devel] Re: [RFC PATCH 0/5] Resend - Use procfs to change a syscall behavior Date: Thu, 10 Jul 2008 02:30:26 -0700 Message-ID: <6599ad830807100230k2f3f3551sa4b804f4c20b43fe@mail.gmail.com> References: <20080703144013.737951000@bull.net> <20080704102702.GB4531@elf.ucw.cz> <486E1276.2080605@bull.net> <20080708105143.GA15311@elf.ucw.cz> <20080708214721.GA1972@us.ibm.com> <20080708215315.GD17083@elf.ucw.cz> <4875B212.5030604@bull.net> <6599ad830807100001j3f3a6cf2y7a19dda9382edb2c@mail.gmail.com> <4875D2EA.4010407@bull.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4875D2EA.4010407-6ktuUTfB/bM@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Nadia Derbey Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Pavel Machek List-Id: containers.vger.kernel.org On Thu, Jul 10, 2008 at 2:14 AM, Nadia Derbey wrote: > But I think that both ways of doing are not exactly the same in case of > failure: > open + dup2 will close newfd if it is already busy. > while > next-syscall_data + open will fail if the target fd is already busy. And > that's the functionality we need during restart, isn't it? No, I don't think so. The cryo restart code should be aware of exactly which fds it has open and which it needs to open, and can shuffle them around as necessary via dup2() to get them into the right places. Paul