[CRIU] Standard stream is not terminal
Pavel Emelyanov
xemul at parallels.com
Mon Sep 1 09:25:00 PDT 2014
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
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.
> at moment of restore we don't know yet if we would need pty to migrate or
> not so we're reserving stdin (which might not be even needed eventually).
> Otherwise we will have to read tty images early and do a complete analisys
> if tty will require migration procedure or not. That's simply how it's done
> at the moment.
>
> Thus no, there is no other option at the moment, you need to provide
> us real tty which we could reuse. Probably we could do a trick --
> defer determination if stdio is tty until we really need it.
>
> I'm not really sure how criu is integrated into startup service,
> Sanidhya mind to provide more details please?
> .
>
More information about the CRIU
mailing list