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 committed Nov 21, 2017
1 parent a848f32 commit 0cf42ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lxc/tools/lxc_init.c
Expand Up @@ -201,6 +201,9 @@ int main(int argc, char *argv[])
if (sid < 0)
DEBUG("Failed to make child session leader");

if (ioctl(STDIN_FILENO, TIOCSCTTY, 0) < 0)
DEBUG("Failed to set controlling terminal");

NOTICE("Exec'ing \"%s\"", my_args.argv[0]);

ret = execvp(my_args.argv[0], my_args.argv);
Expand Down

0 comments on commit 0cf42ed

Please sign in to comment.