aboutsummaryrefslogtreecommitdiff
path: root/src/dirax.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-03-17 17:27:28 +0100
committerThomas White <taw@physics.org>2010-03-17 17:27:28 +0100
commit759c4f7b797dd86d6ac4b1e34601f390371ad651 (patch)
tree3093117621aee2abe69474756429e953be30cfb9 /src/dirax.c
parentf835702bac978da282bc13c8ed2cec1221f391e1 (diff)
Don't connect PTY slave's stderr to master stderr
Doing so causes DirAx to behave REALLY weirdly.
Diffstat (limited to 'src/dirax.c')
-rw-r--r--src/dirax.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/dirax.c b/src/dirax.c
index 06018fb7..9cb4f66c 100644
--- a/src/dirax.c
+++ b/src/dirax.c
@@ -350,11 +350,9 @@ static int dirax_readable(struct image *image)
void run_dirax(struct image *image)
{
unsigned int opts;
- int saved_stderr;
int status;
int rval;
- saved_stderr = dup(STDERR_FILENO);
image->dirax_pid = forkpty(&image->dirax_pty, NULL, NULL, NULL);
if ( image->dirax_pid == -1 ) {
ERROR("Failed to fork for DirAx\n");
@@ -370,9 +368,6 @@ void run_dirax(struct image *image)
t.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
tcsetattr(STDIN_FILENO, TCSANOW, &t);
- /* Reconnect stderr */
- dup2(saved_stderr, STDERR_FILENO);
-
execlp("dirax", "", (char *)NULL);
ERROR("Failed to invoke DirAx.\n");
_exit(0);
@@ -419,7 +414,6 @@ void run_dirax(struct image *image)
} while ( !rval );
close(image->dirax_pty);
- close(saved_stderr);
free(image->dirax_rbuffer);
wait(&status);