[CRIU] [PATCH 10/11] tty: Parse slave index from link path

Pavel Emelyanov xemul at parallels.com
Wed Oct 8 07:57:27 PDT 2014


On 10/08/2014 12:57 AM, Cyrill Gorcunov wrote:
> On Wed, Oct 08, 2014 at 12:51:45AM +0400, Pavel Emelyanov wrote:
>> On 10/06/2014 05:15 PM, Cyrill Gorcunov wrote:
>>> Instead of reading link inside tty code lets
>>> make it on a higher level providing the link
>>> inside fd_params structure (just like we do
>>> for other objects).
>>>
>>> Also because mount point for devpts fs might
>>> be not /dev/pts simply search for index from
>>> the end of the name (as it's done in the
>>> kernel -- the slave index is a numeric name
>>> under the mountpoint).
>>
>> How does the link look like?
> 
> /dev/pts/2 and such (ie previously I did it by hands but
> our fdinfo helpers can do that already :)

Yes, but previously (before the patch) link was read only
for unix-ptys, but now (with the path) it's read for every
tty regardless of its type.



More information about the CRIU mailing list