From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id C1DB41C9C; Sat, 11 Jul 2026 20:14:34 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 947FE1C16; Sat, 11 Jul 2026 20:14:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-yx1-xb131.google.com (mail-yx1-xb131.google.com [IPv6:2607:f8b0:4864:20::b131]) by atuin.qyliss.net (Postfix) with ESMTPS id E89E61C08 for ; Sat, 11 Jul 2026 20:14:28 +0000 (UTC) Received: by mail-yx1-xb131.google.com with SMTP id 956f58d0204a3-667627ae83aso2923015d50.0 for ; Sat, 11 Jul 2026 13:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783800868; x=1784405668; darn=spectrum-os.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9+lO+zAHQgQ2CG0m/ssNW8j0sOU5B2Cf81u9Sx9reKI=; b=CtiFH722Sdyvi5KZ2h+M7JPwDuqB1CNFYMY7iZP6nUC1IwUTdJrn6Cipttta5RTgNB qtJu4naCylZnhqJXlalKcSskiZOGLSbYka+iO6L5semRN3T9oM8uy4lR1dHlrdyZABEQ +cZxc/y12wFBKJkl6y+NeIT9eIlaqrHMLWpOsS2aVJHXOzMnX0T20VcIaiPqpx4yhJ9L XuCp1CEdRmJG3g1EvfkJFoR+hkt29pagtcddvPoSo2B9yMgN8ShrOr++gnfP1G01shbV 4vgg46ljv6S4xhOPI/rzf2RpxVg/qoUEoBVF+nVk7CpSsgbAcGZSLEc0upbFBVQdAlrk joMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783800868; x=1784405668; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9+lO+zAHQgQ2CG0m/ssNW8j0sOU5B2Cf81u9Sx9reKI=; b=IE/nH+wi1CQqdd1VWKR3qajgERnNhWzHMNRmPJi7E90g4wMugSs15w88sC6lZykPDv l/IEwpplgDlEhf40+DaFL/HnoFci2uojn6qrwHotLRKcPu9ywMsZ2IC7tsXG+xfI1o5H 9j9FMUqzyI5IBFlSlL9C8twlpKaeNRyI54NXwKGTr7G9/iLka42o7TRQzxFx3VCbfqoI JZYR2RQuBI5dAVE2lDrMWbFjRFpJj88MkhcE+QiObW8aIOkF3Z7gSSTDSk1GjjoJ5ZU0 xGnxklfoLmfQrVlYPYdMC1evPmjKckfLPiC0cRCOHC8XCvXmULjRqMGqrzau4x93C2OC c6Rg== X-Gm-Message-State: AOJu0YymUDO3enXgklymmJFw1XDtpU6HRrOLhaDttFIj/kBmdp/wayCw oci4dB6+eoMI7mkuF/ZOmp6uaBdyBxsVi/qFK0toAAG3YgTTYpDNetftJ7z4Xg== X-Gm-Gg: AfdE7clkL0Y1MrzX7Sivbi2bHxBm9pM9FR2uOXoVuFaH2bQsLxtsrP5YBGeCTWooTiq OYLxgyTPaTHMfTe1R78BCLuGJNgCMwtSPIIJD86WtCpjReIMA8XVC4ej5btf2cbivegm7oCSSbG s32735RfYQtisYEy7z7T5qaX5+0L/om4ZUTgnlMgD35ZHV+BiUe44hpQuL/0g3xx8oA0M5Oc3Lk +kbsaVbgAU5698nvIT+OtlYTWX0lnBr7FjWdmUuL7KmC5xyJdjapTdoE/i0+m1+ijLnRpHel6+a e8fPLMC4+SVWMptbxcLNdw0uCACLeBfWvLHZoqdui6Juv4uF35aY/8KUG39p4YEoQkyip6Rl8mt Z8DoO0p7kyM6Q//D59HskXYZFwZFaKxUnPT7Q/ms7G2BpNrsGvVLZcZkQra74FfsMQjYEdzjKLc wjRxYENIepRD8VW5rnseMN0alhkQ== X-Received: by 2002:a05:690c:6c90:b0:80d:a249:4854 with SMTP id 00721157ae682-81e9008507emr28766067b3.17.1783800867495; Sat, 11 Jul 2026 13:14:27 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-81e6c22ed8esm77086377b3.44.2026.07.11.13.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2026 13:14:26 -0700 (PDT) From: Demi Marie Obenour Date: Sat, 11 Jul 2026 16:12:13 -0400 Subject: [PATCH v3 09/22] host/rootfs: serial-getty-generator: Use cgroups MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260711-cgroups-v3-9-5cba61a20cba@gmail.com> References: <20260711-cgroups-v3-0-5cba61a20cba@gmail.com> In-Reply-To: <20260711-cgroups-v3-0-5cba61a20cba@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783800724; l=2144; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=Uo2kWKvMx9Wwk7WeAqHeqD+OT0D95mkhC6edFe4DXWQ=; b=8IXRMwUjEARoe86RFPVU+GytydK3baGyzROuHKRbgxBYTxcELGP1HKvLmAeuMtgDBNvnAuwfn SrU5viF/iLNDUDd7QL5piwWTMP+IzcfBSTKI6UnF812s+b36mginqCB X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: 5TNBPL44TULPMGGHD5TQRAD76CJECYUF X-Message-ID-Hash: 5TNBPL44TULPMGGHD5TQRAD76CJECYUF X-MailFrom: demiobenour@gmail.com X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; emergency CC: Demi Marie Obenour , Alyssa Ross X-Mailman-Version: 3.3.10 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Avoids concurrent execution and leaked child processes. Signed-off-by: Demi Marie Obenour --- host/rootfs/file-list.mk | 1 + .../etc/s6-linux-init/run-image/service/serial-getty-generator/finish | 1 + .../etc/s6-linux-init/run-image/service/serial-getty-generator/run | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk index 9375a05a6847ed2b799a13d7be74313459fc9f0e..6144ca829abe4f561b95504b9f77a893c30a37cb 100644 --- a/host/rootfs/file-list.mk +++ b/host/rootfs/file-list.mk @@ -77,6 +77,7 @@ LINKS = \ image/etc/group \ image/etc/passwd \ image/etc/s6-linux-init/run-image/opengl-driver \ + image/etc/s6-linux-init/run-image/service/serial-getty-generator/finish \ image/etc/s6-linux-init/run-image/service/vmm/template/run \ image/lib \ image/sbin \ diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/serial-getty-generator/finish b/host/rootfs/image/etc/s6-linux-init/run-image/service/serial-getty-generator/finish new file mode 120000 index 0000000000000000000000000000000000000000..9e39002e3ae4063bdef05676efb55416020cf7aa --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/serial-getty-generator/finish @@ -0,0 +1 @@ +/usr/bin/cgroup-setup \ No newline at end of file diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/serial-getty-generator/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/serial-getty-generator/run index bf66ab0878fc6d8e77ca71a4a89e50c139a6bb11..a1846a29cf55892127feb7ecfc0adcd12f0497bd 100755 --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/serial-getty-generator/run +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/serial-getty-generator/run @@ -1,7 +1,9 @@ -#!/bin/execlineb -WP +#!/bin/execlineb -WS1 # SPDX-License-Identifier: EUPL-1.2+ # SPDX-FileCopyrightText: 2024-2025 Alyssa Ross +# avoid concurrent operation +cgroup-setup --leaf -- $1 piperw 3 4 background { fdclose 3 -- 2.55.0