nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] whatnow brittle wrt. $SHELL


From: Alexander Zangerl
Subject: Re: [Nmh-workers] whatnow brittle wrt. $SHELL
Date: Mon, 23 Jul 2012 09:11:01 +1000

On Sun, 22 Jul 2012 12:41:41 -0500, David Levine writes:
>I added a test of that (unset SHELL) to whatnow/test-ls.
>But it doesn't seem to catch the problem on Linux.  It looks
>like its system() always sets SHELL to /bin/bash if it was

not quite so in my experience on linux systems: 
system() and popen() *always use* /bin/sh -c, and 
totally ignore SHELL. 

but: /bin/bash itself does set SHELL, so if it's involved 
you'll have next to no chance of seeing this scenario. 
the environment where i encountered the problem involves /bin/dash,
the posix-only shell that debian defaults to for /bin/sh (and a 
build tool that's a tad overzealous in cleaning the environment).

the nmh code tries to be "nice and helpful" and work with
the user's preferred shell, so we certainly waste
some cycles with /bin/sh -c whatevershell -c ...actual stuff...

personally i don't think that aiming for the users' preferred
shell is necessary for the not-very-interactive situation
with whatnow, so the $SHELL -c code should indeed be dumped
in the long run.

regards
az


-- 
Alexander Zangerl + GnuPG Keys 0x42BD645D or 0x5B586291 + http://snafu.priv.at/
#define sizeof(x) rand() -- Dark_Brood

Attachment: signature.asc
Description: Digital Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]