diff options
| author | Stefan Monnier | 2010-08-04 20:10:07 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-04 20:10:07 +0200 |
| commit | aaa0a19a94473d6ede50d6d43018f68efc363432 (patch) | |
| tree | a36e3b6f180863a68b8bc6ab280f10dbd8e80a4a /src | |
| parent | e0d62a9b7b7cb411d8b2638fa0cc3788d8ea8e6b (diff) | |
| download | emacs-aaa0a19a94473d6ede50d6d43018f68efc363432.tar.gz emacs-aaa0a19a94473d6ede50d6d43018f68efc363432.zip | |
* src/sysdep.c (child_setup_tty): Comment-out left-over non-ICANON code.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/sysdep.c | 29 |
2 files changed, 20 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7e286f6eea7..d8177bbe8af 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-08-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * sysdep.c (child_setup_tty): Comment-out left-over non-ICANON code. | ||
| 4 | |||
| 1 | 2010-08-03 Johan Bockgård <bojohan@gnu.org> | 5 | 2010-08-03 Johan Bockgård <bojohan@gnu.org> |
| 2 | 6 | ||
| 3 | * data.c (Flocal_variable_p): Handle variable aliases correctly. | 7 | * data.c (Flocal_variable_p): Handle variable aliases correctly. |
diff --git a/src/sysdep.c b/src/sysdep.c index 43c71ef5ea0..1b2c9324528 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -503,26 +503,29 @@ child_setup_tty (int out) | |||
| 503 | s.main.c_cflag = (s.main.c_cflag & ~CBAUD) | B9600; /* baud rate sanity */ | 503 | s.main.c_cflag = (s.main.c_cflag & ~CBAUD) | B9600; /* baud rate sanity */ |
| 504 | #endif /* AIX */ | 504 | #endif /* AIX */ |
| 505 | 505 | ||
| 506 | /* We used to enable ICANON (and set VEOF to 04), but this leads to | 506 | /* We originally enabled ICANON (and set VEOF to 04), and then had |
| 507 | problems where process.c wants to send EOFs every once in a while | 507 | proces.c send additional EOF chars to flush the output when faced |
| 508 | to force the output, which leads to weird effects when the | 508 | with long lines, but this leads to weird effects when the |
| 509 | subprocess has disabled ICANON and ends up seeing those spurious | 509 | subprocess has disabled ICANON and ends up seeing those spurious |
| 510 | extra EOFs. So we don't send EOFs any more in | 510 | extra EOFs. So we don't send EOFs any more in |
| 511 | process.c:send_process, and instead we disable ICANON by default, | 511 | process.c:send_process. First we tried to disable ICANON by |
| 512 | so if a subsprocess sets up ICANON, it's his problem (or the Elisp | 512 | default, so if a subsprocess sets up ICANON, it's his problem (or |
| 513 | package that talks to it) to deal with lines that are too long. */ | 513 | the Elisp package that talks to it) to deal with lines that are |
| 514 | /* There is no more "send eof to flush" going on (which is wrong and | 514 | too long. But this disables some features, such as the ability |
| 515 | unportable in itself), and disabling ICANON breaks a lot of stuff | 515 | to send EOF signals. So we re-enabled ICANON but there is no |
| 516 | and shows literal ^D in many cases. The correct way to handle too | 516 | more "send eof to flush" going on (which is wrong and unportable |
| 517 | much output is to buffer what could not be written and then write it | 517 | in itself). The correct way to handle too much output is to |
| 518 | again when select returns ok for writing. This has it own set of | 518 | buffer what could not be written and then write it again when |
| 519 | problems. Write is now asynchronous, is that a problem? | 519 | select returns ok for writing. This has it own set of |
| 520 | How much do we buffer, and what do we do when that limit is reached? */ | 520 | problems. Write is now asynchronous, is that a problem? How much |
| 521 | do we buffer, and what do we do when that limit is reached? */ | ||
| 521 | 522 | ||
| 522 | s.main.c_lflag |= ICANON; /* Enable line editing and eof processing */ | 523 | s.main.c_lflag |= ICANON; /* Enable line editing and eof processing */ |
| 523 | s.main.c_cc[VEOF] = 'D'&037; /* Control-D */ | 524 | s.main.c_cc[VEOF] = 'D'&037; /* Control-D */ |
| 525 | #ifdef 0 /* These settins only apply to non-ICANON mode. */ | ||
| 524 | s.main.c_cc[VMIN] = 1; | 526 | s.main.c_cc[VMIN] = 1; |
| 525 | s.main.c_cc[VTIME] = 0; | 527 | s.main.c_cc[VTIME] = 0; |
| 528 | #endif | ||
| 526 | 529 | ||
| 527 | #else /* not HAVE_TERMIO */ | 530 | #else /* not HAVE_TERMIO */ |
| 528 | 531 | ||