Merge pull request #11 from gnawux/fix_symlink

add symlink /dev/{stdin,stdout,stderr} to /proc/self/fd/{0,1,2}
This commit is contained in:
Xu Wang
2015-10-04 08:26:55 +08:00
+5
View File
@@ -389,6 +389,11 @@ static int hyper_container_init(void *data)
goto fail;
}
symlink("/proc/self/fd", "/dev/fd");
symlink("/proc/self/fd/0", "/dev/stdin");
symlink("/proc/self/fd/1", "/dev/stdout");
symlink("/proc/self/fd/2", "/dev/stderr");
execvp(container->exec.argv[0], container->exec.argv);
perror("exec container command failed");