[ksh93-integration-discuss] command substitution, exec, and stdout redirection cause allocation loop
Roland Mainz
roland.mainz at nrubsig.org
Sat Apr 12 05:27:05 PDT 2008
David Powell wrote:
> The following one-liner (including back ticks) causes ksh93 to spin
> out of control consuming all memory at a *very* rapid pace:
>
> `exec program > file`
>
> If "file" is a real file (as opposed to /dev/null), the file will
> also grow without bound. "program" need not exist, i.e.
>
> `exec > file`
>
> has the same result. Using $() instead of `` also has the same
> effect.
>
> This works fine under all other bourne-compatible shells.
>
> (I've filed this as bug 6687139.)
Fixed with yesterday's putback for
http://bugs.grommit.com/show_bug.cgi?id=468 ('Need patch for endless
memory allocation loop for "$(exec no_such_program > real_file)"') - see
attached commit message.
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
-------------- next part --------------
An embedded message was scrubbed...
From: bugzilla-daemon at np.grommit.com
Subject: [Bug 468] Need patch for endless memory allocation loop for "$(exec
no_such_program > real_file)"
Date: Fri, 11 Apr 2008 11:45:40 -0700 (PDT)
Size: 2490
Url: http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/attachments/20080412/f200e8e7/attachment.nws
More information about the ksh93-integration-discuss
mailing list