[packages/mksh] - behave as proper sh when invoked as /bin/sh, wothout fancy, incompatible hacks - rel 2
Kacper Kornet
draenog at pld-linux.org
Wed Dec 17 12:02:44 CET 2014
On Wed, Dec 17, 2014 at 12:15:09PM +0200, Elan Ruusamäe wrote:
> On 17.12.2014 10:07, Kacper Kornet wrote:
> >> - behave as proper sh when invoked as /bin/sh, wothout fancy, incompatible hacks
> >> - rel 2
> >This change breaks our rc-scripts:
> >$ rpm -q mksh
> >mksh-50d-1.x86_64
> >$ /bin/sh -c "echo -en '\n'"
> >$ rpm -q mksh
> >mksh-50d-2.x86_64
> >$ /bin/sh -c "echo -en '\n'"
> >-en \n
> >There was a small discussion about it some time ago:
> >https://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2011-May/153795.html
> so, our rc-scripts is not using portable shell. what would be
> portable (posix) version of above code that behaves as rc-scripts
> intended?
> printf?
However there is no builtin printf. So every call to it would cost a
fork. Although man mksh says about printf:
This is not normally part of mksh; however, distributors may have added
this as builtin as a speed hack. Do not use in new code.
--
Kacper
More information about the pld-devel-en
mailing list