Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ksh is broken
On Mar 17, 8:21pm, okuyama%flex.phys.tohoku.ac.jp@localhost (Rin Okuyama) wrote:
-- Subject: ksh is broken
| Hi,
|
| ksh is broken due to changes made in bin/ksh/siglist.sh Rev 1.10:
|
| % ksh
| $ /bin/echo a
| a
| (then, ksh is permanently trapped in __sigsuspend14)
|
| This is because siglist.out, which is generated by siglist.sh, is not
| sorted, and SIGABRT = SIGIOT = 6 appears two times. The followings are
| codes from bin/ksh/trap.c, which apparently fails with siglist.out
| which is not sorted or has duplicated entries:
|
| Trap sigtraps[SIGNALS+1] = {
| { .signal = SIGEXIT_, .name = "EXIT", .mess = "Signal 0" },
| #include "siglist.out" /* generated by siglist.sh */
| { .signal = SIGERR_, .name = "ERR", .mess = "Error handler" },
| };
| ...
| sigtraps[SIGINT].flags |= TF_DFL_INTR | TF_TTY_INTR;
| sigtraps[SIGQUIT].flags |= TF_DFL_INTR | TF_TTY_INTR;
| sigtraps[SIGTERM].flags |= TF_DFL_INTR;/* not fatal for interactive */
| sigtraps[SIGHUP].flags |= TF_FATAL;
| sigtraps[SIGCHLD].flags |= TF_SHELL_USES;
|
| /* these are always caught so we can clean up any temporary files. */
| setsig(&sigtraps[SIGINT], trapsig, SS_RESTORE_ORIG);
| setsig(&sigtraps[SIGQUIT], trapsig, SS_RESTORE_ORIG);
| setsig(&sigtraps[SIGTERM], trapsig, SS_RESTORE_ORIG);
| setsig(&sigtraps[SIGHUP], trapsig, SS_RESTORE_ORIG);
| ...
|
| I guess that siglist.sh Rev 1.10 is a work around for gcc 5, whose cpp
| generates noisy output. Here I attached another work around based on
| siglist.sh Rev 1.9. It is kind of an ugly hack, but at least works with
| both gcc 4.8 and 5.3.
Thanks!
christos
Home |
Main Index |
Thread Index |
Old Index