Unverified Commit 46047d1f by Jonathan Calmels Committed by Christian Brauner

lxc_init: set the control terminal in the child session

parent e2bce0ec
...@@ -193,7 +193,10 @@ int main(int argc, char *argv[]) ...@@ -193,7 +193,10 @@ int main(int argc, char *argv[])
if (sid < 0) if (sid < 0)
DEBUG("Failed to make child session leader"); 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");
NOTICE("Exec'ing \"%s\"", aargv[0]);
ret = execvp(aargv[0], aargv); ret = execvp(aargv[0], aargv);
ERROR("Failed to exec: '%s' : %s", aargv[0], strerror(errno)); ERROR("Failed to exec: '%s' : %s", aargv[0], strerror(errno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment