diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-02-03 18:40:03 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-02-03 18:40:03 +0000 |
| commit | cb2e1a17b309618e1bbea2a5b06968828a5f5ae6 (patch) | |
| tree | d15acd73a36fca90efacad988a2509040edc8bf7 /src/shell_manager.cc | |
| parent | f500af9023d68f593000f9784f48927f3efdb6a8 (diff) | |
Fix some bugs in non blocking pipe writing
Diffstat (limited to 'src/shell_manager.cc')
| -rw-r--r-- | src/shell_manager.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc index 63ec22a5..a663c59f 100644 --- a/src/shell_manager.cc +++ b/src/shell_manager.cc @@ -215,12 +215,13 @@ std::pair<String, int> ShellManager::eval( (size_t)contents.length()); if (size > 0) contents = contents.substr(ByteCount{(int)size}); - if (size == -1 and (errno = EAGAIN or errno == EWOULDBLOCK)) + if (size == -1 and (errno == EAGAIN or errno == EWOULDBLOCK)) return; if (size < 0 or contents.empty()) { pipe.close_write_fd(); watcher.disable(); + return; } } }) |
