procmail
[Top] [All Lists]

Re: Procmail rejects zsh as being "broken"

1996-08-01 06:46:49
borsenkow(_dot_)msk(_at_)sni(_dot_)de <borsenkow(_dot_)msk(_at_)sni(_dot_)de> 
wrote:
I recently installed procmail-3.11pre4 under zsh-3.0pre4. When running
'make init' procmail gave me warning, that `/opt/local/bin/zsh is broken'.
I checked initmake script and here is relevant part:

case "$SHELL" in
...
      *zsh*) $RM src/_autotst
           $SHELL <<HERE
           O="echo test >src/_autotst"
           exec 2>$DEVNULL
           \$O
HERE                                                                           

          if test ! -f src/_autotst 
          then
             echo "Warning: your $SHELL is broken, avoiding it"; SHELL=""
          fi ;;

The test seems to imply, that in
% foo="echo test > test"
% $foo

the line is to be rescanned for I/O redirections *after* foo is expanded. 
I am not aware of any shell to behave this way. 

You're right.  Sorry, my mistake.  The test is a bit too rigorous, it
now fails on every shell (which just had the effect that it never used
the zsh, which is why I never noticed the problem, of course).  The intent
was to check for something else.

Do I  miss something? What is the sense of this test? And why it is done
only for zsh ;)?

The test should have read (fixed in the next release :-):

        *zsh*) $RM src/_autotst
            $SHELL <<HERE
            O="echo test"
            exec 2>$DEVNULL 1>&2
            \$O && echo test >src/_autotst
HERE

As to why it is just being tested on zsh, well, that's the only shell
that (ever) exhibited this (broken) behaviour.
-- 
Sincerely,                                                          
srb(_at_)cuci(_dot_)nl
           Stephen R. van den Berg (AKA BuGless).
Auto repair rates: basic labor $40/hour; if you wait, $60; if you watch, $80;
if you ask questions, $100; if you help, $120; if you laugh, $140.

<Prev in Thread] Current Thread [Next in Thread>