git://git.jankratochvil.net
/
nethome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
57cf3cc
)
Workaround a readline deadlock bug in _get_tty_settings().
author
lace
<>
Tue, 10 Jul 2007 21:43:43 +0000
(21:43 +0000)
committer
lace
<>
Tue, 10 Jul 2007 21:43:43 +0000
(21:43 +0000)
src/orphanripper.c
patch
|
blob
|
history
diff --git
a/src/orphanripper.c
b/src/orphanripper.c
index
0615aa4
..
cf3039f
100644
(file)
--- a/
src/orphanripper.c
+++ b/
src/orphanripper.c
@@
-87,6
+87,10
@@
static int spawn (char **argv)
/* With TERMP passed as NULL we get "\n" -> "\r\n". */
cfmakeraw (&termios);
/* With TERMP passed as NULL we get "\n" -> "\r\n". */
cfmakeraw (&termios);
+#ifdef FLUSHO
+ /* Workaround a readline deadlock bug in _get_tty_settings(). */
+ termios.c_lflag &= ~FLUSHO;
+#endif
child = forkpty (&amaster, childptyname, &termios, NULL);
switch (child)
{
child = forkpty (&amaster, childptyname, &termios, NULL);
switch (child)
{
@@
-98,6
+102,15
@@
static int spawn (char **argv)
assert (i == 0);
i = close (pipefd[1]);
assert (i == 0);
assert (i == 0);
i = close (pipefd[1]);
assert (i == 0);
+
+ /* Do not replace STDIN as inferiors query its termios. */
+#if 0
+ i = close (STDIN_FILENO);
+ assert (i == 0);
+ i = open ("/dev/null", O_RDONLY);
+ assert (i == STDIN_FILENO);
+#endif
+
/* Do not setpgrp(2) in the parent process as the process-group
is shared for the whole sh(1) pipeline we could be a part
of. The process-group is set according to PID of the first
/* Do not setpgrp(2) in the parent process as the process-group
is shared for the whole sh(1) pipeline we could be a part
of. The process-group is set according to PID of the first