Set stdin to /dev/null instead of closing it when we dont have data to pipe to child
Fixes #1330 Fixes #1331
This commit is contained in:
parent
e722868c60
commit
caed8a55c7
|
@ -172,7 +172,7 @@ std::pair<String, int> ShellManager::eval(
|
||||||
move(child_stdin.read_fd(), 0);
|
move(child_stdin.read_fd(), 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
close(0);
|
move(open("/dev/null", O_RDONLY), 0);
|
||||||
|
|
||||||
close(child_stdout.read_fd());
|
close(child_stdout.read_fd());
|
||||||
move(child_stdout.write_fd(), 1);
|
move(child_stdout.write_fd(), 1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user