Fantastic :) this is the answer I was waiting for ;)
I will see if they can do the change in the code base, meanwhile I will go my 
own way patching.
Thanks a lot,
Gabriele
----------------------------------------------------------------------------------------
Sonicle S.r.l.
:
http://www.sonicle.com
Music:
http://www.gabrielebulfon.com
Quantum Mechanics :
http://www.cdbaby.com/cd/gabrielebulfon
Da:
Erik Trimble
A:
discuss@lists.illumos.org
Data:
29 agosto 2016 10.06.48 CEST
Oggetto:
Re: [discuss] default system shell
Your RedHat friend is, frankly, talking out of his ass.
First off, Ksh (also known as ksh88) is fully, 100% backwards compatible with 
the Bourne shell (sh).
Secondly, ksh93 is also 100% compatible with Bourne shell (sh), but is NOT 100% 
compatible with ksh88 (a couple of things changed).
Thirdly, the POSIX shell standard specification is based on ksh88, with a 
couple of minor changes.  The result is that ksh93 isn't quite absolutely 100% 
POSIX compliant. Bourne Shell is not POSIX-compliant at all.
Fourthly, Bash started out as "enhanced" ksh93 (different codebase though), and 
theoretically was Bourne-compliant at that time.  This was two decades ago, and 
Bash has long, long, long since given up being 100% Bourne compatible.  Even 
with the --posix flag, it's not 100% Posix Shell compatible either.
Here's a not-so-short list of differences (both features and behavior) of Bash 
vs Bourne shell:
http://www.gnu.org/software/bash/manual/html_node/Major-Differences-From-The-Bourne-Shell.html
The local variable problem is almost certainly a Bash-ism.  That is, the code 
is using a Bash-specific feature, and committing the cardinal developer sin of 
assuming their local system setup is What the World Uses.
Ksh (both ksh88 and ksh93) supports local variables, but the syntax is 
different.  Bourne Shell doesn't support local variables.
You should inform the upstream code maintainers that they have a major 
portability mistake, and that THEY should fix this. It would be nice to provide 
them with patches, but this is a problem that isn't just you, it's in the 
codebase itself.  This kind of assumption is on the same level as assuming all 
modern CPUs are little-endian, just because most people run x86.
If a developer is going to use features in a shell that assume a certain shell, 
then that shell should be explicitly invoked by the script, not presuming the 
system is configured the same way the developer's environment is.
I get sensitive to this, because I'm a Systems person, and I see this kind of 
hubris all the time, and it causes an unending stream of headaches that 
inevitably get laid at my door, rather than the developer, who is the guilty 
party.
-Erik
illumos-discuss
|
Archives
|
Modify
Your Subscription



-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com

Reply via email to