> > Do I understand correctly, that /bin/bash, which is execed directly by
> > fgetty behaves bad, but any it's child is okay?

> That is correct. If /bin/bash -or other command interpreters
> available in Debian- are accessed through fgetty, they b ehave bad
> (interpretting [�-�] or "�" key presses as escape
> sequences). Besides, when trying to type [�-�,�], the system just
> beeps, that is: no "(arg: 1) " appear.

How insert this fancy letter "�"? I tried to `loadkeys es', but I
failed to locate this letter.

Also, let me ask you to check some of my wild guesses:

 - please, invoke `stty -a' in bad and good shells and tell,
   if there is any difference.
 - please, try to call 'reset' in bad shell and see, whether it helps
 - please, change your shell to /bin/sh and tell, whether anything changes
   (/bin/sh does not have .rc file, to make more clean experiment)
 - please apply following patch and tell, if anything changes

--- a/login.c
+++ b/login.c
@@ -45,17 +45,9 @@ void die(const char *message) {
 struct termios oldtermios;

 static void echo_off() {
-  struct termios foo;
-  if (tcgetattr(0,&oldtermios))
-    die("tcgetattr failed");
-  foo=oldtermios;
-  foo.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
-  tcsetattr(0, TCSANOW, &foo);
 }

 static void echo_on() {
-  oldtermios.c_lflag |= ECHO | ECHOE | ECHOK;
-  tcsetattr(0, TCSANOW, &oldtermios);
 }

 main(int argc,char *argv[]) {
--- a/fgetty.c
+++ b/fgetty.c
@@ -32,11 +32,6 @@ void error(char *message,int exitcode) {
 }

 static void echo_off() {
-  struct termios foo;
-  if (!tcgetattr(0,&foo)) {
-    foo.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
-    tcsetattr(0, TCSANOW, &foo);
-  }
 }

 int doutmp() {

---
---

-- 
Accept: text/plain, text/x-diff
Accept-Language: eo,en,ru
X-Web-Site: sinsekvu.github.io

Reply via email to