Skip to content

Commit

Permalink
lxc_init: set the control terminal in the child session
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
  • Loading branch information
3XX0 authored and Christian Brauner committed Dec 17, 2017
1 parent 06485e3 commit 7754c37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lxc/tools/lxc_init.c
Expand Up @@ -193,7 +193,8 @@ int main(int argc, char *argv[])
if (sid < 0)
DEBUG("Failed to make child session leader");

NOTICE("About to exec '%s'", aargv[0]);
if (ioctl(STDIN_FILENO, TIOCSCTTY, 0) < 0)
DEBUG("Failed to set controlling terminal");

ret = execvp(aargv[0], aargv);
ERROR("Failed to exec: '%s' : %s", aargv[0], strerror(errno));
Expand Down

0 comments on commit 7754c37

Please sign in to comment.