ALERT!! Error in Inn-CURRENT-20090412
Julien ÉLIE
julien at trigofacile.com
Sun Apr 12 19:56:52 UTC 2009
Hi Russ,
> We should turn lists into space-separated string values for Bourne shell.
> It's not ideal, but I suspect it will mostly work.
So if I have the following list:
param: [ one "it's me" "and a quote\"" ]
does it give:
PARAM='"one" "it'\''s me" "and a quote\""'
or something else?
(We need to handle spaces in the general case -- not only overview fields.)
>> However, I think there is a more major issue because I see that
>> Makefile.global.in defines an hard-coded shell:
>>
>> SHELL=/bin/sh
>
> This is only for running commands in makefiles, so it won't matter.
But what if /bin/sh does not exist?
They advise to use SHELL = @SHELL@ (as found out by autoconf) in:
http://www.gnu.org/software/hello/manual/autoconf/The-Make-Macro-SHELL.html
>> There is also innd/site.c with:
>>
>> static char SITEshell[] = "/bin/sh";
>
> No idea what this is being used for. Maybe to spawn programs from
> newsfeeds?
Yes:
if (NeedShell(process, (const char **)argv, (const char **)ARRAY_END(argv))) {
argv[0] = SITEshell;
argv[1] = (char *) "-c";
argv[2] = process;
argv[3] = NULL;
}
/* Fork a child. */
i = Spawn(sp->Nice, pan[PIPE_READ], (int)fileno(Errlog),
(int)fileno(Errlog), argv);
We could have put @SHELL@ too here.
>> On your system, I see that configure finds /bin/bash, so it would be
>> fine. Nonetheless, I see that on another system, it finds a wrong
>> /bin/sh (not aliased to /bin/bash) which does not understand arrays...
>
> The more fundamental problem is that some systems (older Solaris) don't
> have bash, and trying to find a shell that supports arrays may be tricky.
Too bad that Autoconf does not know how to find that :)
> Since we're not using the arrayness right now in shell, I wouldn't worry
> too much about it and just turn it into a space-separated list in a
> string.
OK.
--
Julien ÉLIE
« -- C'est un drôle de nom, HCL.
-- C'est son immatriculation d'espion. Son vrai nom,
c'est Acidcloridrix... » (Astérix)
More information about the inn-workers
mailing list