[CRIU] Re: [PATCH 09/10] tty: Introduce deferred dumping of tty peers

Pavel Emelyanov xemul at parallels.com
Fri Oct 26 16:18:45 EDT 2012


On 10/27/2012 12:16 AM, Cyrill Gorcunov wrote:
> On Sat, Oct 27, 2012 at 12:15:23AM +0400, Pavel Emelyanov wrote:
>>> Thus when we start dumping ptmx peer (which belongs to SCREEN)
>>> we've not yet constructed the process tree item for children
>>> (ie /bin/bash) and the lookup function in tty code (which walks
>>> over all process items in a tree) simply fails to find sid of
>>> child, because we've not yet dumped it.
>>
>> Are we talking about this code
>>
>>         if (pti->sid) {
>>                 struct pstree_item *item = find_first_sid(pti->sid);
>>                 if (!item || item->pid.virt != pti->sid) {
>>                         if (!opts.shell_job) {
>>                                 pr_err("Found sid %d pgid %d on slave peer fd %d. "
>>                                        "Missing option?\n",
>>                                        pti->sid, pti->pgrp, p->fd);
>>                                 return -1;
>>                         }
>>                 }
>>         }
>>
>> in dump_pty_info? The find_first_sid() finds nothing, right?
> 
> yeah, this is main problem.

OK. Let's move forward. This find_first_sid() is required to make sure
that the session leader of tty's session is with us, correct?


More information about the CRIU mailing list