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 9F2F4A3DF; Sun, 30 Aug 2026 06:45:22 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 61B42A3B6; Sun, 30 Aug 2026 06:45:20 +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-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by atuin.qyliss.net (Postfix) with ESMTPS id C276AA41F for ; Sun, 30 Aug 2026 06:45:19 +0000 (UTC) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-81ecf499af9so27619687b3.1 for ; Sat, 29 Aug 2026 23:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788072318; x=1788677118; 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=yLw8M6dPa0g5KAcNgQiJ9+jMXcgJ8eiAlsgrT8z2J1s=; b=rdiez1d0dSssFvI6YOAFbsH7JOqfIiDs3gmINsKuVuBWBuXowMzwOCa4O3+IGKqsLu dVBxv2JPJZnDUJ3vbnVFZ5qcRtCwDXAhteczWM/oawkQiKSy0MfOf9qUAiFffoJdWPnK 7ThwV3BIywg096hqgGvrbPRm3TRGBymzE2BwfsBmdKupYP4r4Ra72otkNNJfht0FNkpK cg5Vk7SJ0s0hJZVgR5dDVytyMrduROAjfVOzUscUVLgMPOQaztzv8qC83VSMa6wPdOtu vP7AUXJYCBIzskHPhsFfIx/2QarqAEDFEsNEVUzlqLk5iqQkR0gkCgZRaSCVVkA+W3bq 4GSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788072318; x=1788677118; 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=yLw8M6dPa0g5KAcNgQiJ9+jMXcgJ8eiAlsgrT8z2J1s=; b=MvZny307lYCTpHRz0KdW1/UZbLKYu1gd4KSB4qZIjUIVBIemEEmiztGN/fIuFkW7V/ rdPXoG6wjDbGPkhbakUK0DU06B4QGQscS9abgTw8rQDTfNBG7CorgYXtQUt6+DuXSei7 5mTIZayErHz0rGoChAUFrE+kldAWrAIvCHzBNHMulsAzxqry5KSgIzB+tA20X5hJ7WUl IjpSAoPhUmMFdFGMYo0Cdym9L6gOeaV2VtJ6tnnOYQTN7PXYrwJ6H/hPnzZ7ppWQoR+o sOkdVgNHeYHqBCTsOK/pMOF2EE7+1ceVRNI7FrOPGL1nyCKP/PQOa6Y19LhBNRctH7ZA E2Nw== X-Gm-Message-State: AFuF++ljS+MLFTH3CcCSz3YI6PcTOkOnF5RFy6ea9JUyxed8HoXpHMy6 9dcnP2p1PgmfqjiijU6WGiWEIiHCH7hpbw3zxqRmFdi7XMM0KzChuYrKC91RfA== X-Gm-Gg: AYBFou3VEk4qYpCTWN1rxy00fQrRIWPB1P+cVTRVFSrwMc47ZILkUgvGEIPu+bjhDze EvUaVhhAOF/UdVgAem5FCfvpMufkBjbwCISmvmOpvPQGilL0vb6YXc8fJSdLNnlg3DcF4sEXSwG CMFJ3yW5gbqcrhdP/hGavXxd8JDLwxC49IcYrL24BfpkIMaPU8LwSUpR7XoQahV6bgiTm1LE3o/ z9LymooP+adVgGsBiDJJHnEyQRpv7NM6ZZU0Kzw9glDmg9Y7sNTcNMC//v7KGp6gbCJzfEteQwn gMicNKXbJh3A6QWnnDpHrP6OdMMTaYl/sFGAm9WWWFm+V+JgOoHVdx8k4Z5TUqe27LxDHf9EMYL 9qtlp8yLBLawgPT0Vpq5LDFwlvW7D64yOcm0+1GUol6MYS+IwxIwsmnbW6XTU45/KLbsGln1BO/ 2Xdzlo4+HAzJDa5RPjwtjHyAgn6aku2Nnu5+ldEU/At56MoqkHvPnzTpV9ANBoGGNLu4L+HlOLN Q== X-Received: by 2002:a05:690c:4385:b0:854:d9d0:46b5 with SMTP id 00721157ae682-85d6a2e0665mr51796287b3.19.1788072318564; Sat, 29 Aug 2026 23:45:18 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-8616243a833sm14596947b3.13.2026.08.29.23.45.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 23:45:17 -0700 (PDT) From: Demi Marie Obenour Date: Sun, 30 Aug 2026 02:06:40 -0400 Subject: [PATCH v8 06/18] host/rootfs: serial-getty-generator: Use cgroups MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260830-cgroups-v8-6-239b09ba7013@gmail.com> References: <20260830-cgroups-v8-0-239b09ba7013@gmail.com> In-Reply-To: <20260830-cgroups-v8-0-239b09ba7013@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788069995; l=2532; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=ihOqZ7fbKqtpUA6g9RXn2z8OWtSDvbmxUB0rNd/S3ro=; b=ETRiidhDSghOaKjoR8GeW1pR9ne2bsXtMIRa8y83WhvqEiyWu74F6gMsViU2B562tS8tXFKaH hqLNOVR84hRCIJ6vX4Cms/yCTkaChmL1X8E2ASDWGHT0xZ8MVHnooua X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: YUSILAPX6NSHZZH4AS44UO56KZPA7YIL X-Message-ID-Hash: YUSILAPX6NSHZZH4AS44UO56KZPA7YIL 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..e655b1fab3931e5c9a5258237f5d64a69f2a1388 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 -- $1 piperw 3 4 background { fdclose 3 -- 2.55.0