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 0807F9343; Thu, 06 Aug 2026 01:20:16 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 0E2B592D1; Thu, 06 Aug 2026 01:20:11 +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-xb12a.google.com (mail-yx1-xb12a.google.com [IPv6:2607:f8b0:4864:20::b12a]) by atuin.qyliss.net (Postfix) with ESMTPS id A5B849308 for ; Thu, 06 Aug 2026 01:20:10 +0000 (UTC) Received: by mail-yx1-xb12a.google.com with SMTP id 956f58d0204a3-664b05d408bso1617882d50.1 for ; Wed, 05 Aug 2026 18:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785979209; x=1786584009; 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=kV+Fnk5pl9TfVCks9BJG5pg0kcr6vHanzNlfk89awnA=; b=bLooSNNnW00lFMPUMXDCWKoPzZ/ABqC3sIoJbb7qi2SRvitSvWeO4cUvwM4V8s7dOj BXKj3lQkYiJ+pwA/t4YmCboOToGkOMZMGdgGUXTMHCPYX+L6HsA1V88mD/+mwYB0KbEe C47ztip95Qeq5cUBKd5ZjnLWfYQmJL+G/5cRn60EHk7AMktYHkGmgVJJYeqq6NjxlBwa MiKs7DA1sew3HRW3clVa8mNWefdR86bnO0sUptE7JX2+zmz/gdkv0dPvWFqexJWPm/aJ FNbjCg9hyyoh+RqAaiocCk7V2L2fp4mgwIRbxxzYqJBGY991VyDYIwEctoGZRGX+yxxS FZxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785979209; x=1786584009; 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=kV+Fnk5pl9TfVCks9BJG5pg0kcr6vHanzNlfk89awnA=; b=i2ck8Wzo9WHjzEDgTn6j8A5+Xbt2l8VF5WkDYtXUdKSE/fL9o0vBESRFXE2f48f/cT yFQscXSxE+7N1CHC850hM0x7ArvscZPvfkgoqva2DBpTsaZXZs20lGsv3nPK6zgq7gk5 iH/Xmje1baPkIrxYSYbhgfNypw67XgxigOUVzyT0KzUwZKS5/zRWa4ZMEK2SiVz0ltyu /cLcO4fW8W+CZdja2Svlo122CJZCKGl3RH/h7i5BoBv2TW5g81cgx8dFkOHxHvpzsC15 f4uDbSIC4opH/8LO9NKW03KyEVHKBe+RcgsKQY7c+KGCQvNbPBh46rKPJS/DkzrgRL83 6OUw== X-Gm-Message-State: AOJu0YzU6bbEcSW5jZNkHTvwUqoSZgyHduvNtjAKnCt+5elJ8+srwvT0 yRaI63qQX0z423FQ7h43r14e/8H8+72F2tDC9KK/80jf3EFSu1cM2vCE1SPXfg== X-Gm-Gg: AR+sD11iMMTiePKQJkk+LhMdCNZaZKcWGJLPlAYos38mrOwjUcq5sSj12IH7yheXq9u /UIfEL+s3vrC/HKV52BqE9w4vxubiPApRswKY4Im2hjVwsma3JZaFcC+PSKV8MesqLPU4fL9t3l oKLXHAxc0X1h85PxGCUCPjSkL1CEPZMOOAT107LznhU8mNNGZuil4abIKbW/D0Z+evyS9K5PPE9 C3SZtewX5PsD8hlcSfsORk2u5jIg0c33oR+ZWgDCgcbkhgPja+eWHw2panbkuXd5WyOXCGOVqPB vsqx2G0qinR6FRcCJICqUCB58B4/JcVpBQh6L3kqa4VWE4/M7Lh4NuL8j6AEucEx0B+EhTtHJH8 UO4FIIJfpr9w6xN0UdIXfClt+8lDMPShGbl+zAFCpnPV8rW17TQOelfCEpplHz/Lo4ulclIpO+R nRZ5HF8H4pK6fhoz5xwv+6+YJzisnlkn4dAMGTA31VE6lbK5o1C9VpfQv5igF8swPwn/PI2AYTU A== X-Received: by 2002:a05:690c:4a13:b0:820:12dd:7472 with SMTP id 00721157ae682-82022728a20mr73761247b3.23.1785979209337; Wed, 05 Aug 2026 18:20:09 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-820134e3521sm31064717b3.46.2026.08.05.18.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 18:20:08 -0700 (PDT) From: Demi Marie Obenour Date: Wed, 05 Aug 2026 21:16:14 -0400 Subject: [PATCH v6 07/19] host/rootfs: serial-getty-generator: Use cgroups MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260805-cgroups-v6-7-086c0f00f55f@gmail.com> References: <20260805-cgroups-v6-0-086c0f00f55f@gmail.com> In-Reply-To: <20260805-cgroups-v6-0-086c0f00f55f@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1785978967; l=2539; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=nR9qFCQWFAvzsDZYiGCA/g/s2k1xOXxarCkaGVbSiwg=; b=GZaQu3/cCs6prqpCcK3GMAmrtPkQcsjIOObG9C93caFrmI+x6ZH55t2T1FAGvH9wHbWuUt7vp OLKArZXx3z0CcCMPHpm0Fy0GmN9Vwh3sinyHlA5WSq8TgALAbP+0uTp X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: NMTRH4YTC4B4TQA27MJY6J7TV3AQUXZY X-Message-ID-Hash: NMTRH4YTC4B4TQA27MJY6J7TV3AQUXZY 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 Reviewed-by: Alyssa Ross --- host/rootfs/file-list.mk | 1 + .../s6-linux-init/run-image/service/serial-getty-generator/finish | 5 +++++ .../etc/s6-linux-init/run-image/service/serial-getty-generator/run | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk index 3899d620717fc97f42e669e5313c4100dcf5b1cd..deb4937fe380ff143fc2aafccee1b846fe15b974 100644 --- a/host/rootfs/file-list.mk +++ b/host/rootfs/file-list.mk @@ -21,6 +21,7 @@ FILES = \ image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run \ image/etc/s6-linux-init/run-image/service/s6-svscan-log/notification-fd \ image/etc/s6-linux-init/run-image/service/s6-svscan-log/run \ + image/etc/s6-linux-init/run-image/service/serial-getty-generator/finish \ image/etc/s6-linux-init/run-image/service/serial-getty-generator/run \ image/etc/s6-linux-init/run-image/service/serial-getty/notification-fd \ image/etc/s6-linux-init/run-image/service/serial-getty/run \ 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 100755 index 0000000000000000000000000000000000000000..b1fb5799a949a5e69d5926a2145873da5f09e0a3 --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/serial-getty-generator/finish @@ -0,0 +1,5 @@ +#!/usr/bin/execlineb -WS3 +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2026 Demi Marie Obenour + +cgroup-purge $3 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