On Tue, Aug 12, 2003 at 09:58:15AM -0700, Jeffrey R Lewis wrote:
Runhugs as of Oct 2002 handled command-line args supplied by #! scripts. HEAD however, doesn't.
That would be my fault. I re-instated option processing for the server after it had been accidentally deleted, but did it too simplistically.
Here's the issue. Given a script named `foogle-script' that starts with...
#! /usr/bin/runhugs -98 -h20000
runhugs will be given the following arguments:
arg0: /usr/bin/runhugs arg1: -98 -h20000 arg2: foogle-script
Note that the `-98' and `-h2000' have been collapsed to a single arg. This is bizarre, but apparently it's what linux does. The problem is that loadHugs will treat the argv like a normal one, and will expect the `-98' to be a single argument.
It's POSIX, I think.
I've tweaked processOptions to eat spaces and continue after it has processed each toggle group (not checked in). Do people think this is cool, or does anyone have an opinion about a better solution?
That will affect hugs too, which is probably not a good thing. I've put the old code back -- it affects runhugs run either way and also ffihugs, which is too much, but at least not hugs.