[Devel] Re: [PATCH][cr-test] eclone-2 bug fix

Serge E. Hallyn serue at us.ibm.com
Tue May 4 06:33:28 PDT 2010


Quoting Sukadev Bhattiprolu (sukadev at linux.vnet.ibm.com):
>  	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
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list