[CRIU] [PATCH 7/9] tty: Implement support of current tty

Pavel Emelyanov xemul at parallels.com
Fri Mar 13 04:41:06 PDT 2015


> @@ -1025,6 +1026,21 @@ int prepare_fds(struct pstree_item *me)
>  			break;
>  	}
>  
> +	for (state = 0; state < ARRAY_SIZE(states); state++) {
> +		if (!states[state].required) {
> +			pr_debug("Skipping %s fd stage\n", states[state].name);
> +			continue;
> +		}
> +
> +		/*
> +		 * Opening current TTYs require session to be already set up,
> +		 * thus slave peers already handled now it's time for cttys,

IOW the /dev/tty should only be ->open-ed after the respective tty's ->post_open?

> +		 */
> +		ret = open_fdinfos(me->pid.virt, &rsti(me)->tty_ctty, state);
> +		if (ret)
> +			break;
> +	}
> +
>  	if (rsti(me)->fdt)
>  		futex_inc_and_wake(&rsti(me)->fdt->fdt_lock);
>  out:



More information about the CRIU mailing list