> On Jun 16, 2023, at 11:39 PM, LitHack <litha...@gmail.com> wrote:
> 
> ---------- Forwarded message ---------
> From: LitHack <litha...@gmail.com>
> Date: Sat, 17 Jun 2023 at 08:52
> Subject: Crashing the Linux System
> To: <linux-ker...@vger.kernel.org>
> 
> 
> Running the yes command in command substitution will crash the linux shell.
> According to me inside command the substitution it is creating multiple
> process(fork).  Command: `yes` or $(yes)
> 
> Here is the bug report:
> Bug report <https://bugzilla.kernel.org/show_bug.cgi?id=217565>


You already posted this exact "bug report" to zsh-work...@zsh.org,
and the answer you got there applies here too: This is user error
and not a bug.


Begin forwarded message:

> From: Bart Schaefer <schae...@brasslantern.com>
> Subject: Re: Crashing the Linux System
> Date: June 17, 2023 at 12:43:02 AM EDT
> To: LitHack <litha...@gmail.com>
> Cc: zsh-work...@zsh.org
> 
> On Fri, Jun 16, 2023 at 8:38 PM LitHack <litha...@gmail.com> wrote:
>> 
>> Running the yes command in command substitution will crash the linux shell. 
>> According to me inside command the substitution it is creating multiple 
>> process(fork).  Command: `yes` or $(yes)
> 
> The "yes" command is defined to produce an unending stream of output.
> The $(...) substitution is defined to capture all the output from a
> command and substitute it as a string.  "All the output" of "yes" is
> impossible to capture in finite memory.  The error I get from zsh is
> the expected one:
> zsh: fatal error: out of heap memory
> There definitely are not multiple forks happening.
> 
> This is not a bug except in the sense that it was user error to use
> $(yes) in the first place.  It's no different than deliberately
> writing an infinite loop such as $(while true; do echo y; done).



-- 
vq

Reply via email to