From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20897 invoked from network); 17 Jun 2023 04:43:49 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Jun 2023 04:43:49 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1686977030; b=fvN41yb7NlUEn3duvQkJsjxgI1CeS9qcHqFCn/ZAP71PlTPFwarLltWLa1kq+r0KIvzbyVvo0t c0faPF1ybiZ7Y/RnID6jEbBjJfwZ0szC/Gh5eVrJK4uVqzhT6N54vQ1967DT8Ige2fihTPKJRl sCn6pJGiyNBRT02hvTo6IzLk8bO1Kt2P/mjezMY1x0TUvtWgVkARTSjxpNp0oBAmuV3YmkEd6V z9mHTJYlCjYcv8Ompm1Do23Z4HFolbfB2pSRue8alXWveyCOQtiMJbhHhO4OHfm8EXbeGQzwta XgEv/piPy6CW9vuYgu0crjBrApbitwUYd+B5vrGU/TuI2w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f47.google.com) smtp.remote-ip=209.85.208.47; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1686977030; bh=7nA0nj39lHWMvkq2y3/AaB4fdsM/6CIppQLnBIEURXA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=ocj4mxyn2W3nUhEFrRqmnTXdFLLu3kJJOsCscy7Okkme3IBhYP4AUM1Culm0OSG8xQi15wbJea lZUkduApTIMK7fGucN8SOPnUq58EHSl+Y5wuRnGDF6yOjItCoTdDTQWoh/bAhX8CHx4hyrEgJU xSAOJY/4mCL0l+fm/NkGWVzN3y9MtvGR5gI3qTH9fmQZ+S6H4XTB98HYYdGMp+0ywPX3qdSGd6 znvLfijPzEls8Pd6ejudnSPzlInZ/bv3/o0o0Lus9ZwjBzsN1YEVER6rP+6JTAndMHNhwp/yL2 y9RsPADALdseuF9vc8h/TEUvnhXAiXBTyyl261VhpBF5iA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=via8DKUqcrOxB0aAt4rEC9OArvuCuDdDbmZXI0jjgmg=; b=pZY3HbUmYn2gVAy02t/9qTde+q yLwMQ+o+rfgjDvceioPeRqe4P/A2HMzMq8n/Rl19TCEzF/ehj9kSO68u2sb1LJKwhrbGz+giZ34E0 lWLpGysPJ3MvfNbvdJFslGH3cGduIGdp6op24r/YgnjJD2GtdfNAvviQ3BFKLRhxI4lUzF0vTLxF4 7gqUSUAhY/C3w2C1uhhbyId2TXuWagM2Gj0DM18VN1BMIiYomFmkXZaHdfIl9rDVXHFvnYuLBA/SG 4CnV0zuAQSa3lAIu9OdrhEEgTIFsF/AdlvXGxVskUC/AS5k61qzcX0BtZyAxK6YaINgXFlnQmrzft uoyNDhqw==; Received: by zero.zsh.org with local id 1qANmu-00027d-P8; Sat, 17 Jun 2023 04:43:48 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f47.google.com) smtp.remote-ip=209.85.208.47; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f47.google.com ([209.85.208.47]:54754) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qANmM-0001nr-QH; Sat, 17 Jun 2023 04:43:16 +0000 Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-51a426e4f4bso1043092a12.1 for ; Fri, 16 Jun 2023 21:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1686976994; x=1689568994; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=via8DKUqcrOxB0aAt4rEC9OArvuCuDdDbmZXI0jjgmg=; b=RWv8xKG/9rW+19k0rKxOIvdrgy/IQhizK3hb+7UQpXCA/FNmPZ48eCDn8O32avpDPO bI4qziVPVCFZ1jNJyigIF8SCPhOQzv+YIr0TuDyGF8pBmMjTtREtZUb1FsbTSuQsURsD NcNIazwhO6XBfH7By5Q9WrcInISLxv2/UUBVM5fd8SHfZRGqAlMSZib/EJtDwanCsZKp QB1cM64Jydz5A5+396FCrIMmywEbZUj6s+SuW+diT57CvGlA2tadvWmcb9YMSMr0kdvQ Ao6SpYxhc4KxIhY1whZiQmRK3Gvzx13Y+9IgWVen9/ROyjKY5R/mUgLF8Gu+GSgnqq+w 9uvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686976994; x=1689568994; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=via8DKUqcrOxB0aAt4rEC9OArvuCuDdDbmZXI0jjgmg=; b=BYQUCJejwq15e6/Xo8QHnZXlJV11OnQDZsQgxZl/X0T77ZdxOSFR2Z2lkhBJ3WqzVn WXEiGGPLOgt6sAyNJVsDGLiweN8Z9z+6kcqbejdgjDTLbxKbTKd1Vw+rnDXXqCHdkJsJ JurBF2qQfJLDaDCcZAn7Zpy4rqNeApeUSw2ZUr3m6ydCXqsIrCNHnwtrk6Qm/D7Y3hPH mugAIPxiSOsQbHNp9M08SJ9UIk6OtRiAOnSNQadxO2TCQ/ce2gch4zhfteK+LYIv9F9k N3Z+u6ELR9DRCsMBPfoj+OX6ZOf7QtmhKOzYY63R2j7ncoJK7Rne4xU/rWShkFqmou3T aFKw== X-Gm-Message-State: AC+VfDxy8Rl7LcnhPk4LVDyf4InLHsJ4uE4+/jU5hEfKYBisAZJW4OHS i80PiZDUglEolVVJqvjVTS60hs88Y3zFviVlanPINw== X-Google-Smtp-Source: ACHHUZ6IPHNHbLdVl7zCmbl0qCSpoiSqP2lDwXCScO/5+uBKknF+h9nwloariHWMGx5zv383iDLe3QOm+4GwUuMTEsY= X-Received: by 2002:a17:907:a409:b0:973:ad8f:ef9b with SMTP id sg9-20020a170907a40900b00973ad8fef9bmr3700594ejc.5.1686976994022; Fri, 16 Jun 2023 21:43:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Fri, 16 Jun 2023 21:43:02 -0700 Message-ID: Subject: Re: Crashing the Linux System To: LitHack Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51868 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, Jun 16, 2023 at 8:38=E2=80=AFPM LitHack wrote: > > Running the yes command in command substitution will crash the linux shel= l. 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).