Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Sukadev Bhattiprolu
	<sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: Containers
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [PATCH][cr-test] eclone-2 bug fix
Date: Tue, 4 May 2010 08:33:28 -0500	[thread overview]
Message-ID: <20100504133328.GA10214@us.ibm.com> (raw)
In-Reply-To: <20100504020919.GB5098-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.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

  parent reply	other threads:[~2010-05-04 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04  2:09 [PATCH][cr-test] eclone-2 bug fix Sukadev Bhattiprolu
     [not found] ` <20100504020919.GB5098-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-05-04 13:33   ` Serge E. Hallyn [this message]
     [not found]     ` <20100504133328.GA10214-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-05-04 17:30       ` Sukadev Bhattiprolu
     [not found]         ` <20100504173051.GA11116-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-05-04 19:39           ` Serge E. Hallyn
     [not found]             ` <20100504193934.GA4781-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-05-05  2:04               ` Sukadev Bhattiprolu
     [not found]                 ` <20100505020404.GA19821-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-05-05 13:59                   ` Serge E. Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100504133328.GA10214@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox