[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /bin/sh (was Re: jessie release goals)



On 2013-05-07 14:23:47 +0000, Thorsten Glaser wrote:
> Shells suitable for /bin/sh are currently bash, dash, mksh.

I forgot about that (partly because of workarounds), but due to the
SIGINT problem, I think that *currently*, among these 3 shells, bash
is the most suitable one, and mksh is a bit better than dash. Indeed
/bin/sh is used by system(), meaning that in particular, it is often
executed to run interactive programs, some of which trapping SIGINT.
If the shell doesn't implement WCE[*], one may get spurious failures
(e.g. when Ctrl-G is typed in some versions of Emacs, Ctrl-C in gdb,
etc.).

[*] http://www.cons.org/cracauer/sigint.html

AFAIK, only bash and ksh93 implement WCE. And mksh has an optimization
so than when the "mksh -c" string consists of only one command, the
problem doesn't occur (because in such a case, the shell does not fork,
but exec's the command, so that the shell is no longer involved when
the signal is sent).

> I believe posh can be made suitable with a bit of hacking it
> (e.g. adding fixes from mksh) and coreutils moving /usr/bin/printf
> to /bin/printf (best way out of the Md issue, really).

But posh doesn't implement WCE either.

My bug reports:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683671 for dash
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708633 for posh
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708634 for mksh

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: