From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: SIGPROF + SIGCHLD and igc Date: Tue, 24 Dec 2024 13:59:43 +0100 Message-ID: References: <87o713wwsi.fsf@telefonica.net> <87ldw7fwet.fsf@protonmail.com> <87a5cnfj8t.fsf@protonmail.com> <86seqe4j4f.fsf@gnu.org> <87ttaucub8.fsf@protonmail.com> <87pllicrpi.fsf@protonmail.com> <864j2u442i.fsf@gnu.org> <86h66t2qdg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3395"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pipcet@protonmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 24 14:00:05 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tQ4W4-0000hx-V9 for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Dec 2024 14:00:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQ4Vr-0005xK-HR; Tue, 24 Dec 2024 07:59:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ4Vq-0005wo-3Y for emacs-devel@gnu.org; Tue, 24 Dec 2024 07:59:50 -0500 Original-Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQ4Vo-0001eu-75; Tue, 24 Dec 2024 07:59:49 -0500 Original-Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5d3f28a4fccso7526952a12.2; Tue, 24 Dec 2024 04:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735045185; x=1735649985; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c4Y6Z+aEeUybygv6L/yYt2c6SlWME1vYuvCsGAi8r4s=; b=KvfjOqN6HtR2FNngVf2NPScuVOEN7DP2FMJblB2/y2veU4gGAQNGQoWUF81fAiPQyE lQADuWI5a/892HeKCR6m0cFaDnnYAF6x0FPDWU+fBY6j2uN45p5lrfAcdJ1x/PKMoCm7 lgkS2HmzyLmSFnHa/60s7saeE3+ehP5UIyuUa0meda3UpfVW7Dq2TSThLcebuZcIh/fU oWdjOCt4oyAHwwGWsGrkcwZWyuSZ8b0WpORL/83B4rQh3z1bNOXL5Yen3zIqT8ZZtUZ3 5d72RisWb6NxHy1D/yuBbZg2UXoPINj5uHQUWHouoxj8RiVgDIcCsbDgFN6pUqNjnR9j ATkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735045185; x=1735649985; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=c4Y6Z+aEeUybygv6L/yYt2c6SlWME1vYuvCsGAi8r4s=; b=YdxYg6AjJ79QlXFUddrmgoJgLGJB34uebuafSge06lEzfKxAFQt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wf47NEC5lT+FshQ== X-Received: by 2002:a17:906:7955:b0:a9e:d4a9:2c28 with SMTP id a640c23a62f3a-aac348c389dmr1567918366b.53.1735045185213; Tue, 24 Dec 2024 04:59:45 -0800 (PST) Original-Received: from pro2 (p200300e0b7326d00f9ed2197837c3ebd.dip0.t-ipconnect.de. [2003:e0:b732:6d00:f9ed:2197:837c:3ebd]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e89490dsm647248066b.45.2024.12.24.04.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 04:59:44 -0800 (PST) In-Reply-To: <86h66t2qdg.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Dec 2024 14:54:19 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327003 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: pipcet@protonmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, >> eller.helmut@gmail.com, acorallo@gnu.org >> Date: Tue, 24 Dec 2024 07:03:53 +0100 >>=20 >> (I've given this a new subject.) > > Not a second too soon! > >> This is about SIGCHLD, and I must say I find it a bit hard to tell if >> all other platforms do the same. There are simply too many #if's to >> consider in the signal handling code. >>=20 >> Anyway, what I see here: SIGCHLD doesn't do anything dangerous in the >> signal handler. Instead, the occurrence of SIGCHLD is added to a queue >> with enqueue_async_work and that's basically it. > > Are we looking at the same code? I was talking about > handle_child_signal, which is called thusly: No we aren't :-). My mistake. I was looking at he code Pip wrote. See Helmut's later message and my response. > > static void > deliver_child_signal (int sig) > { > deliver_process_signal (sig, handle_child_signal); > } > > What I see in handle_child_signal is not what you describe above. > >> The work items in the queue are processed by process_pending_signals, >> outside of the signal handler. Very nice, that's how it should be :-). > > I think you are looking at how SIGIO and SIGALRM are processed. > >> (And maybe, just as an inspiration, one could use that construct for >> SIGPROF?) > > Could one? SIGPROF's handler should sample the "program counter", so > delaying the sample will sample it in a wrong place. Right? Taking the backtrace would be done in the signal handler, the rest would be done elsewhere. So, no.