chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ccf22d4
)
ptyfwd: make master terminal attributes raw, too
author
Lennart Poettering
<lennart@poettering.net>
Wed, 18 Dec 2013 17:14:10 +0000
(18:14 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 18 Dec 2013 17:21:28 +0000
(18:21 +0100)
src/shared/ptyfwd.c
patch
|
blob
|
history
diff --git
a/src/shared/ptyfwd.c
b/src/shared/ptyfwd.c
index 72aa59efb7e30be87ce82e8accd8470cae6a20a2..85fc8f1b34f5c6770ad052d041e6d74e0f44dcd1 100644
(file)
--- a/
src/shared/ptyfwd.c
+++ b/
src/shared/ptyfwd.c
@@
-343,8
+343,8
@@
static int process_pty_loop(int master, sigset_t *mask, pid_t kill_pid, int sign
int process_pty(int master, sigset_t *mask, pid_t kill_pid, int signo) {
struct termios saved_stdin_attr, raw_stdin_attr;
struct termios saved_stdout_attr, raw_stdout_attr;
int process_pty(int master, sigset_t *mask, pid_t kill_pid, int signo) {
struct termios saved_stdin_attr, raw_stdin_attr;
struct termios saved_stdout_attr, raw_stdout_attr;
-
bool saved_stdin = false
;
- bool saved_stdout = false;
+
struct termios master_attr
;
+ bool saved_std
in = false, saved_std
out = false;
struct winsize ws;
int r;
struct winsize ws;
int r;
@@
-369,6
+369,11
@@
int process_pty(int master, sigset_t *mask, pid_t kill_pid, int signo) {
tcsetattr(STDOUT_FILENO, TCSANOW, &raw_stdout_attr);
}
tcsetattr(STDOUT_FILENO, TCSANOW, &raw_stdout_attr);
}
+ if (tcgetattr(master, &master_attr) >= 0) {
+ cfmakeraw(&master_attr);
+ tcsetattr(master, TCSANOW, &master_attr);
+ }
+
r = process_pty_loop(master, mask, kill_pid, signo);
if (saved_stdout)
r = process_pty_loop(master, mask, kill_pid, signo);
if (saved_stdout)