diff options
-rw-r--r-- | open_issues/bash_vs_screen_vs_sigint.mdwn | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/open_issues/bash_vs_screen_vs_sigint.mdwn b/open_issues/bash_vs_screen_vs_sigint.mdwn new file mode 100644 index 00000000..e6d9b41c --- /dev/null +++ b/open_issues/bash_vs_screen_vs_sigint.mdwn @@ -0,0 +1,68 @@ +[[!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]] + +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 + error in the not-*screen* case, and in the **128** value for `$?`. The + former is an error, and the latter may be as expected. (Check GNU/Linux + with that *bash* version.) + + * 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 + * 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. + + +To sum up: + + * *bash*: 4.0 packages have the MIG error, and the 128 return value difference. + + * *screen*: new package doesn't react to `C-c` anymore. |