Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 1999 15:11:20 +0100
From:      Martin Cracauer <cracauer@cons.org>
To:        Jean-Marc Zucconi <jmz@FreeBSD.ORG>
Cc:        sprice@hiwaay.net, current@FreeBSD.ORG, bde@FreeBSD.ORG
Subject:   Re: sh bug
Message-ID:  <19991117151120.A9616@cons.org>
In-Reply-To: <199911171310.OAA19461@qix.jmz.org>; from Jean-Marc Zucconi on Wed, Nov 17, 1999 at 02:10:51PM %2B0100
References:  <Pine.OSF.4.10.9911080833480.2465-100000@fly.HiWAAY.net> <199911171310.OAA19461@qix.jmz.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--bg08WKrSYDhXBjb5
Content-Type: text/plain; charset=us-ascii

In <199911171310.OAA19461@qix.jmz.org>, 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 <cracauer@cons.org> http://www.cons.org/cracauer/
BSD User Group Hamburg, Germany     http://www.bsdhh.org/

--bg08WKrSYDhXBjb5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

? 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);

--bg08WKrSYDhXBjb5--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991117151120.A9616>