[CRIU] Standard stream is not terminal

Pavel Emelyanov xemul at parallels.com
Mon Sep 1 10:35:07 PDT 2014


On 09/01/2014 08:31 PM, Cyrill Gorcunov wrote:
> On Mon, Sep 01, 2014 at 08:25:00PM +0400, Pavel Emelyanov wrote:
>> On 09/01/2014 07:52 PM, Cyrill Gorcunov wrote:
>>> On Mon, Sep 01, 2014 at 07:43:27PM +0400, Pavel Emelyanov wrote:
>>>> On 09/01/2014 06:54 PM, Sanidhya Kashyap wrote:
>>>>>
>>>>>
>>>>>     Well, one of the way is to not pass -j option, then criu will not use standart
>>>>>     terminal. This though will not allow you to migrate terminals. See
>>>>>
>>>>>     http://criu.org/Advanced_usage "Shell jobs C/R" article.
>>>>>
>>>>>
>>>>> I guess, this (without -j option) won't work in case of processes attached to any pts. And if I will try
>>>>> to take dump of the process without -j, there will be a problem with that. Is there any other alternative
>>>>> that you can let me know.
>>>>
>>>> Why are we playing with -j option at all? AFAIU Sanidhya is trying to dump
>>>> the whole service which should be self contained and doesn't require this one.
>>>> Am I wrong?
>>>
>>> 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?

>> sits in the external session. Nothing more. It does tricks with terminals
>> as well, yes. But if we're dumping a session leader that has some terminal
>> opened, we do not need the -j -- the terminal in question will (should) be
>> just re-opened on restore by path and that's it.
> 
> the patch I sent should fix this problem
> .
> 



More information about the CRIU mailing list