diff options
author | anholt <anholt@FreeBSD.org> | 2005-01-14 06:58:38 +0800 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2005-01-14 06:58:38 +0800 |
commit | c15b2c7753aee3d563b24eb5dc6bfbb452d91f5d (patch) | |
tree | 78b90a370584b6d73c209845f5fd70f71a170ab1 /x11 | |
parent | 260238acb10a2971b72173373fe3fcefa007ba53 (diff) | |
download | freebsd-ports-gnome-c15b2c7753aee3d563b24eb5dc6bfbb452d91f5d.tar.gz freebsd-ports-gnome-c15b2c7753aee3d563b24eb5dc6bfbb452d91f5d.tar.zst freebsd-ports-gnome-c15b2c7753aee3d563b24eb5dc6bfbb452d91f5d.zip |
Properly fix the termios race rather than disabling copyTermios.
PR: ports/74981
Submitted by: Rong-En Fan, rafan at infor dotorg
Obtained from: X.Org bugzilla #1400
Diffstat (limited to 'x11')
-rw-r--r-- | x11/xorg-clients/Makefile | 1 | ||||
-rw-r--r-- | x11/xorg-clients/files/patch-luit.c | 93 |
2 files changed, 80 insertions, 14 deletions
diff --git a/x11/xorg-clients/Makefile b/x11/xorg-clients/Makefile index 7ebeac4aedac..b60e8aa449d7 100644 --- a/x11/xorg-clients/Makefile +++ b/x11/xorg-clients/Makefile @@ -7,6 +7,7 @@ PORTNAME= xorg-clients PORTVERSION= 6.8.1 +PORTREVISION= 1 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_XORG} MASTER_SITE_SUBDIR= X11R6.8.1/tars diff --git a/x11/xorg-clients/files/patch-luit.c b/x11/xorg-clients/files/patch-luit.c index 4e7dbece425a..a5e858bc67f2 100644 --- a/x11/xorg-clients/files/patch-luit.c +++ b/x11/xorg-clients/files/patch-luit.c @@ -1,14 +1,79 @@ ---- programs/luit/luit.c.orig Thu Apr 8 05:14:16 2004 -+++ programs/luit/luit.c Thu Apr 8 05:20:18 2004 -@@ -545,9 +545,11 @@ - #endif - installHandler(SIGCHLD, sigchldHandler); - -+/* Disabled, appears to break luit. - rc = copyTermios(0, pty); - if(rc < 0) - FatalError("Couldn't copy terminal settings\n"); -+*/ - - rc = setRawTermios(); - if(rc < 0) +--- programs/luit/luit.c Fri Mar 5 01:48:51 2004 ++++ /tmp/luit/luit.c Sun Jul 18 09:01:22 2004 +@@ -45,6 +45,8 @@ + #include "charset.h" + #include "iso2022.h" + ++static int p2c_waitpipe[2]; ++static int c2p_waitpipe[2]; + static Iso2022Ptr inputState = NULL, outputState = NULL; + + static char *child_argv0 = NULL; +@@ -462,6 +464,8 @@ + exit(1); + } + ++ pipe(p2c_waitpipe); ++ pipe(c2p_waitpipe); + pid = fork(); + if(pid < 0) { + perror("Couldn't fork"); +@@ -470,8 +474,12 @@ + + if(pid == 0) { + close(pty); ++ close(p2c_waitpipe[1]); ++ close(c2p_waitpipe[0]); + child(line, path, child_argv); + } else { ++ close(p2c_waitpipe[0]); ++ close(c2p_waitpipe[1]); + free(child_argv); + free(path); + free(line); +@@ -486,6 +494,7 @@ + { + int tty; + int pgrp; ++ char tmp[10]; + + close(0); + close(1); +@@ -501,6 +510,7 @@ + kill(getppid(), SIGABRT); + exit(1); + } ++ write(c2p_waitpipe[1],"1",1); + + if(tty != 0) + dup2(tty, 0); +@@ -512,6 +522,9 @@ + if(tty > 2) + close(tty); + ++ read(p2c_waitpipe[0],tmp,1); ++ close(c2p_waitpipe[1]); ++ close(p2c_waitpipe[0]); + execvp(path, argv); + perror("Couldn't exec"); + exit(1); +@@ -535,7 +548,9 @@ + int i; + int val; + int rc; ++ char tmp[10]; + ++ read(c2p_waitpipe[0],tmp,1); + if(verbose) { + reportIso2022(outputState); + } +@@ -564,6 +579,9 @@ + + setWindowSize(0, pty); + ++ write(p2c_waitpipe[1],"1",1); ++ close(c2p_waitpipe[0]); ++ close(p2c_waitpipe[1]); + for(;;) { + rc = waitForInput(0, pty); + |