Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!swrinde!dptspd!lcz From: lcz@dptspd.sat.datapoint.com (Lee Ziegenhals) Newsgroups: comp.bugs.sys5 Subject: Re: Nasty bug in release 4 Bourne shell Keywords: Bourne shell, exec, redirection Message-ID: Date: 28 Dec 90 15:28:47 GMT References: Organization: Datapoint Corporation, San Antonio, TX Lines: 18 andy@xwkg.Icom.Com (Andrew H. Marrinson) writes: >In the process of porting smail3.1.19 to System V release 4, I found >a very nasty bug! If you use exec to redirect output in a while loop >(as in ``exec >/tmp/foo'', that is an exec with no command), it only >seems to obey the first such redirection. I RTFM and it gives me no >reason to believe this is other than a bug. (Note: this is Bourne >shell. I haven't checked ksh yet.) I ran into the same problem, doing the same thing you were. Ksh does not have the same problem, so I was able to work around it. Sure threw me for a while, though... >I got this result using Dell Unix. I suspect that it is an AT&T bug, >though. I can't imagine Dell fooled with Bourne shell at all. Let me >know if there is a release 4 System V out there that doesn't do this! It happened to me using the SVR4 code straight from AT&T, so it isn't anything Dell did.