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

Pavel Emelyanov xemul at parallels.com
Fri Mar 13 11:56:01 PDT 2015


On 03/13/2015 04:52 PM, Cyrill Gorcunov wrote:
> On Fri, Mar 13, 2015 at 02:41:06PM +0300, Pavel Emelyanov wrote:
>>> @@ -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?
> 
> yes, only when session is restored. did I miss something on file handling?

No. Why do we restore session in the tty's post_open()? Can we move it to
regular open?



More information about the CRIU mailing list