From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id E99651FF13B for ; Wed, 22 Apr 2026 12:04:14 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BE8C213E6B; Wed, 22 Apr 2026 12:04:14 +0200 (CEST) Message-ID: <4585f723-77b6-4c42-b811-30a9dccf5a00@proxmox.com> Date: Wed, 22 Apr 2026 12:03:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ignore HUP before client connect on pty To: Dominik Csapak , pve-devel@lists.proxmox.com References: <20260422085520.959328-1-d.csapak@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20260422085520.959328-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1776852135421 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.008 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: PEUMR7ZMC2BLJMCUU6HZGH5WYVB3GXP4 X-Message-ID-Hash: PEUMR7ZMC2BLJMCUU6HZGH5WYVB3GXP4 X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 22.04.26 um 10:54 AM schrieb Dominik Csapak: > Since debian trixie, the `login` tool timing changed and it always sends > a HUP first thing. This caused spiceterm to immediately close again. > > To fix that, ignore all HUPs on the PTY side until at least one client > is connected. > > To achieve that the client count is moved inside the SpiceScreen struct, > since that is reachable from all callbacks needed > (connect/disconnect/timeout/channel watcher). > > The only potential downside is if the cmd really exits before a client > connects, it blocks the client for a bit without any indication as to > why and then disconnects. Tested that by replacing `login` with > `/bin/false` and the client disconnected after a few seconds > automatically. > > Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner