This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] sotruss: convert from ksh to bash


On Thu 13 Mar 2014 15:30:05 Roland McGrath wrote:
> > This script works fine under bash (which we already require), so tweak
> > the code to be pure bash.
> 
> I don't think we've documented anywhere that our installed scripts require
> bash.  Some of them already do, so this is not something you're changing
> here.  But before "we already require foo" should generally be considered
> an adequate rationale for a change by itself, it should be a requirement
> that we have made explicit and documented, rather than just a de facto
> requirement that might have snuck in without clear intent.

sotruss itself doesn't work if you don't have bash or ksh.  so what i am 
changing is that ksh is no longer supported.

afaict, the only reason bash is required is for localization of the messages.  
but even that works w/POSIX shell, albeit with slightly funky display -- you 
get a literal $ in the output of each string.

> I also think the changes to the script are fine, but they are purely
> cosmetic and wholly unnecessary.  Your "pure bash" and "to match bash"
> comments seem to imply that "function foo {" style is somehow less
> supported by bash than "foo() {", which AFAIK has never been the case.

true, the current code works under bash unmodified.  really i'm fixing the 
code to be portable to pretty much any shell.  force of habit that i see this 
style and think "that's not valid".

so i guess i'll rewrite this to say "drop ksh support and add basic support 
for any POSIX shell".
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]