[CRIU] Standard stream is not terminal

Pavel Emelyanov xemul at parallels.com
Mon Sep 1 11:05:25 PDT 2014


On 09/01/2014 09:52 PM, Cyrill Gorcunov wrote:
> On Mon, Sep 01, 2014 at 09:35:07PM +0400, Pavel Emelyanov wrote:
>>>>>
>>>>> We require stdin to be a terminal to inherit it when we're migrating pty. Look,
>>>>
>>>> Wait wait wait. The -j option is required _only_ when the task we dump
>>>
>>> This has nothing to do with -j option. What we're doing is
>>>
>>> crtools_prepare_shared
>>>   tty_prep_fds
>>>     trying to reserve stdin for future possible use
>>
>> This is to inherit terminal from parent. Why do we want this in Sanidhya case?
> 
> Because we can :-) Just kidding. Look, it's simply how it's done now -- we don't
> know if we will ever need it or no -- and we reserve/check it early. The patch
> I sent to Sanidhya does the trick -- we reserve this descriptor but instead of
> testing it immediately if it's tty or not, we defer testing, thus if criu won't
> need to inherit terminal during the whole restore procedure, the problem Sanidhya
> is getting simply go away (if I don't miss something obvious what we do now is
> simply a nit and should be fixed with the patch I sent).

No, I don't like it. If we don't need to inherit tty, we don't need the
-j option. If we do need, then it should be a tty from the very beginning.

Thanks,
Pavel




More information about the CRIU mailing list