mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Commands with input set to none would not have stdin closed
This meant if such command would read from its stdin, it would hang. Fixes #1081
This commit is contained in:
@@ -62,7 +62,7 @@ namespace command
|
||||
int inputPipe[2];
|
||||
pipe(inputPipe);
|
||||
fcntl(inputPipe[1], F_SETFD, FD_CLOEXEC);
|
||||
_input_range = _command.input == input::nothing ? text::range_t::undefined : _delegate->write_unit_to_fd(inputPipe[1], _command.input, _command.input_fallback, _command.input_format, _command.scope_selector, _environment, &_input_was_selection);
|
||||
_input_range = _command.input == input::nothing ? (close(inputPipe[1]), text::range_t::undefined) : _delegate->write_unit_to_fd(inputPipe[1], _command.input, _command.input_fallback, _command.input_format, _command.scope_selector, _environment, &_input_was_selection);
|
||||
|
||||
// ----------8<----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user