lkml.org 
[lkml]   [2012]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Q: On restoring terminal with hinted index
On Wed, Aug 15, 2012 at 09:16:10AM -0700, H. Peter Anvin wrote:
> On 08/15/2012 08:25 AM, Cyrill Gorcunov wrote:
> > Hi Peter,
> >
> > that happened that in a sake of restoring ptys after checkpoint
> > we need to create them with predefined indices, as they were at
> > moment of dumping. So we have two options -- 1) Open terminals
> > in sequence until needed index reached 2) Use some other way to
> > say the kernel that some index is preferred.
> >
> > So I thought, would it be acceptible to provide such hint via
> > sysctl, as in patch below (note I've not even compiled it yet,
> > but would like to know your opinion early).
> >
> > (Maybe even make it one shot, thus once ida_get_new_above called
> > the pty_next reset to zero).
> >
>
> Pardon me while I vomit... an interaction between sysctl and open? Talk
> about a race condition from hell. It is stateful, and not connected to
> the filesystem instance that it is supposed to be affecting. So no,
> please don't. I understand your objective but it really needs to be
> something attached to the pts filesystem instance in question.

Sure, i'll think on finding some other way to provide such hint to the
kernel.

Cyrill


\
 
 \ /
  Last update: 2012-08-15 19:02    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog