On Wed, May 30, 2001 at 09:51:52PM -0400, Kyle Donaldson wrote:
> On Wed, 30 May 2001, Jeff Raven wrote:
> >    D) Provide two menu items, say [exec] and [cexec]; the first
> >       would just use "sh", the second "sh -c". rootCommand would
> >       still use "sh -c". For the most part this would make things
> >       work like they used to before the exec code was changed.
> >    E) Provide two menu items, say [exec] and [sexec]; the first
> >       using "sh -c" and the second using "sh". rootCommand would
> >       still use "sh -c".
> 
> Umm... As far as I can tell (and I just tested it) 'sh <command>'
> will NOT work, unless <command> is a shell script. 'sh -c <command>'
> tells sh "execute this command without entering interactive mode".
> 'sh <command>' says "execute this shell script using the shell".

Yes, quite right... lately I've been misremembering command line
options left and right (this is what comes of pondering alternatives
without access to manpages...). Replace the "sh" above with "do some
form of parsing and call exec* ourselves".

> Also, was my execute "semi-patch" totally ignored?
> (http://www.mail-archive.com/[email protected]/msg02459.html)
> I haven't had the time to do a correct patch, because I've been
> working on some new software that has been a total PITA to
> write/debug/smash with sledgehammer.

Since my memory is starting to go (see above), I looked back over
the old execution code. It basically ran things through /bin/sh -c
with an 'exec' prepended to the command (which is why compound
commands didn't really work). Which makes me lean towards the
"just tell people to use 'exec foo' instead of 'foo'" option.

If I were to go with the launch-it-ourselves route, I'd want to
avoid parsing for anything other than arguments -- but then
there's the whole matter of quoting, and people asking why their
`'s, ?'s and *'s aren't working, etc. All in all it seems like a
whole lot of trouble.

But I'll have two weeks to think about it (and the whole malicious
rootCommand thing).

Has anyone tried the smart-placement patch I put up a little
while back? It seems to work fine here, but I don't know how much
of an improvement it actually is, since I've got a pretty fast
box here. Intuition says it should be a change for the better,
though.

Off to vacation,
Jeff Raven

(Oh, and yes, I'm aiming for the next version of blackbox to have
key-navigable menus, but only when they are popped up using the
keyboard.)

Reply via email to