On Wed, Oct 29, 2014 at 03:03:14PM +0000, Serge Hallyn wrote: > If attach is being done over passed-in fds, then we shouldn't > mess with the caller's signal table to ignore ctrl-c over the > fd. > > Signed-off-by: Serge Hallyn <[email protected]>
Acked-by: Stéphane Graber <[email protected]> > --- > src/lxc/attach.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/lxc/attach.c b/src/lxc/attach.c > index 2318018..4010668 100644 > --- a/src/lxc/attach.c > +++ b/src/lxc/attach.c > @@ -758,8 +758,10 @@ int lxc_attach(const char* name, const char* lxcpath, > lxc_attach_exec_t exec_fun > } > > /* ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313 */ > - signal(SIGINT, SIG_IGN); > - signal(SIGQUIT, SIG_IGN); > + if (options->stdin_fd == 0) { > + signal(SIGINT, SIG_IGN); > + signal(SIGQUIT, SIG_IGN); > + } > > /* reap intermediate process */ > ret = wait_for_pid(pid); > -- > 2.1.0 > > _______________________________________________ > lxc-devel mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-devel -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: Digital signature
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
