diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-04-22 09:39:00 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-04-22 09:39:55 +0100 |
| commit | caed8a55c7a5ac2754641769e1f603482886d5f1 (patch) | |
| tree | 1214d6b08d07d292fe1b7a9539c4031de4e9e547 /src/shell_manager.cc | |
| parent | e722868c6014afd6815710766c9e2c9a402f6afb (diff) | |
Set stdin to /dev/null instead of closing it when we dont have data to pipe to child
Fixes #1330
Fixes #1331
Diffstat (limited to 'src/shell_manager.cc')
| -rw-r--r-- | src/shell_manager.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc index 9404f97a..fff042cc 100644 --- a/src/shell_manager.cc +++ b/src/shell_manager.cc @@ -172,7 +172,7 @@ std::pair<String, int> ShellManager::eval( move(child_stdin.read_fd(), 0); } else - close(0); + move(open("/dev/null", O_RDONLY), 0); close(child_stdout.read_fd()); move(child_stdout.write_fd(), 1); |
