[CRIU] [PATCH 1/5] tty: Introduce TTY_TYPE

Pavel Emelyanov xemul at parallels.com
Wed Oct 15 03:14:59 PDT 2014


On 10/15/2014 02:12 PM, Cyrill Gorcunov wrote:
> On Wed, Oct 15, 2014 at 02:02:54PM +0400, Pavel Emelyanov wrote:
>> On 10/15/2014 02:01 PM, Cyrill Gorcunov wrote:
>>> On Wed, Oct 15, 2014 at 01:57:45PM +0400, Pavel Emelyanov wrote:
>>>>>>>  	switch (major) {
>>>>>>> -	case UNIX98_PTY_SLAVE_MAJOR:
>>>>>>>  	case TTYAUX_MAJOR:
>>>>>>> -		return tty_types[major];
>>>>>>> +		if (minor == 0 || minor == 2)
>>>>>>
>>>>>> The comparison of minor first appeared in this patch which makes
>>>>>> it not just "introduce the type" but also "fix some bug".
>>>>>
>>>>> Nope. Not testing minors earlier simply defering exit, 
>>>>
>>>> Where is this place currently in the code?
>>>
>>> parse_pty_index, /dev/console get treated as master pty peer and
>>> of course ioctl doesn't work on it (because /dev/console is a special
>>> slave peer)
>>
>> That's minor == 1. How about the other minors?
> 
> Well, we didn't meet other minors previously so I don't know how
> criu would behave there, if the terminal is pty then it'll pass,
> if no -- fail. Here we require explicit minors match to make
> more predictable behaviour.
> .
> 

So it also a "bugifx". Plz, send me the new comment to this patch.


More information about the CRIU mailing list