From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: Re: [PATCH][cr-test] eclone-2 bug fix Date: Tue, 4 May 2010 08:33:28 -0500 Message-ID: <20100504133328.GA10214@us.ibm.com> References: <20100504020919.GB5098@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20100504020919.GB5098-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 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: Sukadev Bhattiprolu Cc: Containers List-Id: containers.vger.kernel.org Quoting Sukadev Bhattiprolu (sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org): > pid = do_eclone(do_child, CHILD_ARG, flags, nr_pids, pids); > > - if (verbose) { > - printf("[%d, %d]: Parent waiting for %d\n", getpid(), > - gettid(), pid); > + if (pid == -EBUSY) { > + printf("PASS: Unable to create a process with a pid that is " > + "in use\n"); > + return 0; > + } else if (pid < 0) { > + printf("ERROR: eclone(): errno %d\n", pid); > + return 1; Note that if pid > 0 you don't print out an error msg. I pushed a trivial patch on top of this one to do so. Pls let me know if I misunderstood and that wasn't right. thanks, -serge