filtering: close all output descriptors, so that 'xsel' will terminate
For some reason, when copying something to the system clipboard with 'xsel', it wants to see all output descriptors closed before it will exit without requiring ^C. This fixes https://savannah.gnu.org/bugs/?62276. Reported-by: Shi Yanling <sylphenix@126.com> Bug existed since version 2.9.8, since piping text through an external command was introduced.
Этот коммит содержится в:
родитель
ea9d49b9d8
Коммит
6257dec0a7
@ -1034,6 +1034,7 @@ bool execute_command(const char *command)
|
||||
if (should_pipe) {
|
||||
if (dup2(to_fd[0], STDIN_FILENO) < 0)
|
||||
exit(5);
|
||||
close(from_fd[1]);
|
||||
close(to_fd[1]);
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user