Bugzilla – Attachment 51058 Details for
Bug 117193
luit sometimes hangs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
p_bugzilla-117193-luit-sometimes-hangs.diff
p_bugzilla-117193-luit-sometimes-hangs.diff (text/plain), 2.27 KB, created by
Mike Fabian
on 2005-09-28 15:42:26 UTC
(
hide
)
Description:
p_bugzilla-117193-luit-sometimes-hangs.diff
Filename:
MIME Type:
Creator:
Mike Fabian
Created:
2005-09-28 15:42:26 UTC
Size:
2.27 KB
patch
obsolete
>--- xc/programs/luit/luit.c 2004-12-04 18:42:05.000000000 +0100 >+++ xc/programs/luit/luit.c 2005-09-28 17:26:35.000000000 +0200 >@@ -434,6 +434,16 @@ > return 0; > } > >+static void >+sigwinchHandler(int sig) { >+ sigwinch_queued = 1; >+} >+ >+static void >+sigchldHandler(int sig) >+{ >+ sigchld_queued = 1; >+} > > static int > condom(int argc, char **argv) >@@ -444,7 +454,8 @@ > char *path; > char **child_argv; > int rc; >- >+ int val; >+ > rc = parseArgs(argc, argv, child_argv0, > &path, &child_argv); > if(rc < 0) >@@ -461,6 +472,34 @@ > perror("Couldn't drop priviledges"); > exit(1); > } >+ >+ if(verbose) { >+ reportIso2022(outputState); >+ } >+ >+#ifdef SIGWINCH >+ installHandler(SIGWINCH, sigwinchHandler); >+#endif >+ installHandler(SIGCHLD, sigchldHandler); >+ >+ rc = copyTermios(0, pty); >+ if(rc < 0) >+ FatalError("Couldn't copy terminal settings\n"); >+ >+ rc = setRawTermios(); >+ if(rc < 0) >+ FatalError("Couldn't set terminal to raw\n"); >+ >+ val = fcntl(0, F_GETFL, 0); >+ if(val >= 0) { >+ fcntl(0, F_SETFL, val | O_NONBLOCK); >+ } >+ val = fcntl(pty, F_GETFL, 0); >+ if(val >= 0) { >+ fcntl(pty, F_SETFL, val | O_NONBLOCK); >+ } >+ >+ setWindowSize(0, pty); > > pid = fork(); > if(pid < 0) { >@@ -517,53 +556,13 @@ > exit(1); > } > >-static void >-sigwinchHandler(int sig) { >- sigwinch_queued = 1; >-} >- >-static void >-sigchldHandler(int sig) >-{ >- sigchld_queued = 1; >-} >- > void > parent(int pid, int pty) > { > unsigned char buf[BUFFER_SIZE]; > int i; >- int val; > int rc; > >- if(verbose) { >- reportIso2022(outputState); >- } >- >-#ifdef SIGWINCH >- installHandler(SIGWINCH, sigwinchHandler); >-#endif >- installHandler(SIGCHLD, sigchldHandler); >- >- rc = copyTermios(0, pty); >- if(rc < 0) >- FatalError("Couldn't copy terminal settings\n"); >- >- rc = setRawTermios(); >- if(rc < 0) >- FatalError("Couldn't set terminal to raw\n"); >- >- val = fcntl(0, F_GETFL, 0); >- if(val >= 0) { >- fcntl(0, F_SETFL, val | O_NONBLOCK); >- } >- val = fcntl(pty, F_GETFL, 0); >- if(val >= 0) { >- fcntl(pty, F_SETFL, val | O_NONBLOCK); >- } >- >- setWindowSize(0, pty); >- > for(;;) { > rc = waitForInput(0, pty); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 117193
:
50010
| 51058