]> git.tue.mpg.de Git - paraslash.git/commitdiff
gui: Don't close command fds if a key was pressed.
authorAndre Noll <maan@systemlinux.org>
Fri, 3 Jan 2014 18:25:44 +0000 (18:25 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 4 May 2014 12:04:04 +0000 (14:04 +0200)
Killing the command is enough, as command_post_select() will notice
the EOF condition and close these fds.

gui.c

diff --git a/gui.c b/gui.c
index 49f595137ac4c18315ba36e9fa5ffbdef2f69663..6928e0b3c23d7de1019eb81758c9f9cc894cdb05 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -1079,14 +1079,6 @@ check_return:
        case COMMAND_MODE:
                ret = wgetch(top.win);
                if (ret != ERR && ret != KEY_RESIZE) {
-                       if (command_fds[0] >= 0) {
-                               close(command_fds[0]);
-                               command_fds[0] = -1;
-                       }
-                       if (command_fds[1] >= 0) {
-                               close(command_fds[1]);
-                               command_fds[1] = -1;
-                       }
                        if (cmd_pid)
                                kill(cmd_pid, SIGTERM);
                        return -1;