[CRIU] Re: [PATCH]

Pavel Emelyanov xemul at parallels.com
Thu Sep 13 08:10:47 EDT 2012


On 09/13/2012 03:49 PM, Cyrill Gorcunov wrote:
> While I've not yet implemented support for slaves ttys without master
> peers better to  exit with error instead of hanging on restore.
> 
> 	Cyrill

> +int tty_check_orphans(void)
> +{
> +	int i;
> +
> +	for (i = 0; i < (MAX_TTYS << 1) - 1; i += 2) {
> +		int a = test_bit(i, tty_bitmap);
> +		int b = test_bit(i + 1, tty_bitmap);
> +
> +		if (a && (a ^ b)) {
> +			pr_err("Found slave without master\n");

Why a && a ^ b == slave && !master ?

> +			return -1;
> +		}
> +	}
> +
> +	return 0;
> +}



More information about the CRIU mailing list