[lxc-devel] [PATCH] add console to lxc api
Dwight Engen
dwight.engen at oracle.com
Wed May 29 15:26:33 UTC 2013
On Wed, 29 May 2013 10:01:45 -0500
Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> Quoting Serge Hallyn (serge.hallyn at ubuntu.com):
> > Quoting Dwight Engen (dwight.engen at oracle.com):
> > > Make lxc_cmd_console() return the fd from the socket connection
> > > to the caller. This fd keeps the tty slot allocated until the
> > > caller closes it. Returning the fd allows for a long lived
> > > process to close the fd and reuse consoles.
> > >
> > > Add API function for console allocation.
> > >
> > > Create test program for console API.
> > >
> > > Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
> >
> > It looks good and tests fine, so overall
> >
> > Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> >
> > However, do you think it would be better to call this function
> > lxcapi_console_getfd(), and have lxcapi_console() be a higher
> > level function which actually runs the lxc_mainloop() the
> > way lxc_console() does, either binding to the caller's fds
> > 0,1,2, or to 3 passed-in fds?
>
> BTW I'm not asking for that new fn right now, just wondering whether
> we shoudl change the name of the fn in this patch in-line.
Oh, yeah I'm fine with changing it to _getfd() in anticipation of a
higher level lxcapi_console() function. Do we think lxc_cmd_console() is
okay or should it change too (it returns the fd as well) ?
More information about the lxc-devel
mailing list