In <[EMAIL PROTECTED]>, Jean-Marc Zucconi wrote: 
> >>>>> Steve Price writes:
> 
>  > On Mon, 8 Nov 1999, Jean-Marc Zucconi wrote:
>  > # >>>>> Jean-Marc Zucconi writes:
>  > # 
>  > #  > Try this in -current
>  > #  > $ cat some_file | head
>  > # 
>  > #  > I have to use ^C to regain control.
>  > # 
>  > # ... and reverting to rev. 1.22 of eval.c fixes the problem.
> 
>  > Does revision 1.24 work?
> 
> I told you that it worked, but in fact it does not :-)

Please watch your 'To: ', you didn't address me.
 
> Today I encountered again the problem when doing `man MIME::*' (you
> have to install /usr/ports/mail/p5-MIME-Tools). Curiously, I have no
> problem with  `man \*'
> Again reverting to eval.c r1.22 solve the problem.

I can now reproduce the problem. Please test the appended diff which
should fix this problem while still working for the
here-backquote-three-stage-pipeline case.

My apology especially to Bruce, I managed to pass your test case by
not copy/pasting it, but typing it in with "bits" missing :-(

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <[EMAIL PROTECTED]> http://www.cons.org/cracauer/
BSD User Group Hamburg, Germany     http://www.bsdhh.org/
? l
? builtins.c
? builtins.h
? mknodes
? nodes.h
? nodes.c
? mksyntax
? syntax.c
? syntax.h
? token.h
? y.tab.h
? y.tab.c
? arith.c
? arith_lex.c
? sh
? mkinit
? init.c
? sh.1.gz
Index: eval.c
===================================================================
RCS file: /home/CVS-FreeBSD/src/bin/sh/eval.c,v
retrieving revision 1.24
diff -c -r1.24 eval.c
*** eval.c      1999/11/07 17:07:05     1.24
--- eval.c      1999/11/17 14:07:13
***************
*** 499,505 ****
                                close(prevfd);
                        }
                        if (pip[1] >= 0) {
!                               if (prevfd < 0)
                                        close(pip[0]);
                                if (pip[1] != 1) {
                                        close(1);
--- 499,505 ----
                                close(prevfd);
                        }
                        if (pip[1] >= 0) {
!                               if (!(prevfd >= 0 && pip[0] == 0))
                                        close(pip[0]);
                                if (pip[1] != 1) {
                                        close(1);

Reply via email to