mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 03:38:47 +00:00
start: don't unconditionally open("/dev/null")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
87e0e27360
commit
f4c177c3b3
@ -1274,13 +1274,13 @@ static int do_start(void *data)
|
||||
|
||||
close(handler->sigfd);
|
||||
|
||||
if (devnull_fd < 0) {
|
||||
devnull_fd = open_devnull();
|
||||
if (devnull_fd < 0)
|
||||
goto out_warn_father;
|
||||
}
|
||||
|
||||
if (handler->conf->console.slave < 0 && handler->backgrounded) {
|
||||
if (devnull_fd < 0) {
|
||||
devnull_fd = open_devnull();
|
||||
if (devnull_fd < 0)
|
||||
goto out_warn_father;
|
||||
}
|
||||
|
||||
ret = set_stdfds(devnull_fd);
|
||||
if (ret < 0) {
|
||||
ERROR("Failed to redirect std{in,out,err} to \"/dev/null\"");
|
||||
|
Loading…
Reference in New Issue
Block a user