diff options
author | Thomas Schwinge <schwinge@nic-nac-project.de> | 2009-10-08 14:50:56 +0200 |
---|---|---|
committer | Thomas Schwinge <schwinge@nic-nac-project.de> | 2009-10-08 14:51:56 +0200 |
commit | f006d45dda72605da09322dc7941f2ed5629395b (patch) | |
tree | a35877e1812b167fa7319126c444a3ec1ccb68ce /open_issues | |
parent | 924e9702036d8a1506cc6bb07facb18e23494519 (diff) |
open_issues/bash_vs_screen_vs_sigint: Separate bash and screen issue.
open_issues/bash: Add more information w.r.t. PROMPT_COMMAND.
Diffstat (limited to 'open_issues')
-rw-r--r-- | open_issues/bash.mdwn | 47 | ||||
-rw-r--r-- | open_issues/bash_vs_screen_vs_sigint.mdwn | 80 | ||||
-rw-r--r-- | open_issues/screen.mdwn | 10 |
3 files changed, 59 insertions, 78 deletions
diff --git a/open_issues/bash.mdwn b/open_issues/bash.mdwn new file mode 100644 index 00000000..47598071 --- /dev/null +++ b/open_issues/bash.mdwn @@ -0,0 +1,47 @@ +[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_porting]] + +# *bash* 4.0 vs. typing `C-c` (*SIGINT*) + +Will show `-bash: echo: write error: (ipc/mig) wrong reply message ID` unter +certain conditions. + +After having noticed that this error doesn't occur if starting *bash* with +`--norc`, I isolated it to the following command in `.bashrc`: + + case $TERM in + xterm* | rxvt*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"';; + esac + +... and indeed: + + tschwinge@flubber:~ $ echo "$TERM" -- "$PROMPT_COMMAND" + xterm -- echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007" + tschwinge@flubber:~ $ ^C + -bash: echo: write error: (ipc/mig) wrong reply message ID + tschwinge@flubber:~ $ PROMPT_COMMAND= + tschwinge@flubber:~ $ ^C + tschwinge@flubber:~ $ + + bash-4.0$ PROMPT_COMMAND='echo >&2 -n foo\ ' + foo bash-4.0$ ^C + + bash-4.0$ PROMPT_COMMAND='echo >&1 -n foo\ ' + foo bash-4.0$ ^C + bash: echo: write error: (ipc/mig) wrong reply message ID + + bash-4.0$ PROMPT_COMMAND='/bin/echo >&1 -n foo\ ' + foo bash-4.0$ ^C + bash: start_pipeline: pgrp pipe: (ipc/mig) wrong reply message ID + +So, there's something different with stdout in / after the SIGINT handler. diff --git a/open_issues/bash_vs_screen_vs_sigint.mdwn b/open_issues/bash_vs_screen_vs_sigint.mdwn index 47d79c65..9672041c 100644 --- a/open_issues/bash_vs_screen_vs_sigint.mdwn +++ b/open_issues/bash_vs_screen_vs_sigint.mdwn @@ -8,81 +8,5 @@ Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] -[[!tag open_issue_porting]] - -Typing `C-c` (*SIGINT*), different versions of *bash* and *screen* respond like -this: - - * GNU/Linux; Ubuntu package 3.2-5 / `$BASH_VERSION` is `3.2.48(1)-release` - * plain - * shell prompt: new line / prompt printed; `$?` is 1. - * `sleep 10` running: `^C` printed; SIGINT is sent; `$?` is 130. - * in a *screen* session (Ubuntu package 4.0.3-11ubuntu4): exactly the same. - - * GNU/Hurd; Debian package 3.2-6+b1 (equals 3.2-6) / `$BASH_VERSION` is `3.2.48(1)-release`; *libc0.3* Debian package 2.9-25 - * plain - * shell prompt: new line / prompt printed; `$?` is 1. - * `sleep 10` running: `^C` printed; SIGINT is sent; `$?` is 130. - * in a *screen* session (Debian package 4.0.3-11): exactly the same. - - This is equivalent to the GNU/Linux behavior. - - * GNU/Hurd; Debian package 4.0-4 / `$BASH_VERSION` is `4.0.28(1)-release`; *libc0.3* Debian package 2.9-25 - * plain - * shell prompt: `^C`, then new line, then **`-bash: echo: write error: (ipc/mig) wrong reply message ID`**, then new line / prompt printed; `$?` is 128. - * `sleep 10` running: `^C` printed, SIGINT is sent; `$?` is 130. - * in a *screen* session (Debian package 4.0.3-11) - * shell prompt: `^C`, then new line / prompt printed; `$?` is 128. - * `sleep 10` running: `^C` printed; SIGINT is sent; `$?` is 130. - - This differs from the behavior of the earlier *bash* version in the MIG reply - error in the not-*screen* case. The difference in command-line editing - mode, the displaying of `^C` (same on GNU/Linux), and / or the value 128 - for `$?` (same on GNU/Linux) is a bash 4.0 regression that has been fixed - for 4.1 already: - <http://lists.gnu.org/archive/html/bug-bash/2009-10/msg00040.html>. - - * GNU/Hurd; Debian package 4.0-7 / `$BASH_VERSION` is `4.0.33(1)-release`; *libc0.3* Debian packages 2.9-19, 2.9-25, 2.9-27 - * plain - * shell prompt: `^C`, then new line, then **`-bash: echo: write error: (ipc/mig) wrong reply message ID`**, then new line / prompt printed; `$?` is 128. - * `sleep 10` running: `^C` printed; SIGINT is sent; `$?` is 130. - * in a *screen* session (Debian package 4.0.3-11) - * shell prompt: `^C`, then new line / prompt printed; `$?` is 128. - * `sleep 10` running: `^C` printed; SIGINT is sent; `$?` is 130. - - This is equivalent to the *bash* 4.0-4 / 4.0.28(1) behavior. - - * GNU/Hurd; Debian package 4.0-7 / `$BASH_VERSION` is `4.0.33(1)-release`; *libc0.3* Debian package 2.9-27 - * plain - * shell prompt: `^C`, then new line, then **`-bash: echo: write error: (ipc/mig) wrong reply message ID`**, then new line / prompt printed; `$?` is 128. - * `sleep 10` running: `^C` printed; SIGINT is sent; `$?` is 130. - * in a *screen* session (Debian package 4.0.3-14) - * shell prompt: **no reaction (nothing printed)**; `$?` thus is **unchanged**. - * `sleep 10` running: **`^C` printed**, SIGINT is **not** sent. - - The *screen* behavior differs -- [[!debbug 522689#38]]. - - -To sum up: - - * <strike>*screen*: new package causes that invokee doesn't react to `C-c` anymore.</strike> - - * *bash*: 4.0 packages have the MIG reply error. - - After having noticed that this error doesn't occur if starting *bash* with - `--norc`, I isolated it to the following command in `.bashrc`: - - case $TERM in - xterm* | rxvt*) - PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"';; - esac - - ... and indeed: - - tschwinge@flubber:~ $ echo "$TERM" -- "$PROMPT_COMMAND" - xterm -- echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007" - tschwinge@flubber:~ $ ^C - -bash: echo: write error: (ipc/mig) wrong reply message ID - tschwinge@flubber:~ $ PROMPT_COMMAND= - tschwinge@flubber:~ $ ^C - tschwinge@flubber:~ $ + * [[bash]] + * [[screen]] diff --git a/open_issues/screen.mdwn b/open_issues/screen.mdwn index cc2110ad..6ece5c40 100644 --- a/open_issues/screen.mdwn +++ b/open_issues/screen.mdwn @@ -10,6 +10,16 @@ License|/fdl]]."]]"""]] [[!tag open_issue_porting]] +Typing `C-c` (*SIGINT*) in a *screen* session (Debian package 4.0.3-14; -11 is +fine): + + * shell prompt: no reaction (nothing printed) + * `sleep 10` running: `^C` printed, but SIGINT is not sent. + +[[!debbug 522689#38]]. + +--- + Revisit this issue: [[!debbug 97343]] -- special handling of `TIOCSCTTY` depending on `__GNU__`. |