From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Josselin Poiret via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" Newsgroups: gmane.lisp.guile.bugs Subject: bug#70144: system* affects signal handlers Date: Sun, 05 May 2024 18:41:38 +0200 Message-ID: <871q6g5hz1.fsf@jpoiret.xyz> References: <87msqbrga2.fsf@cbaines.net> <877cgcxppu.fsf@gnu.org> Reply-To: Josselin Poiret Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3240"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70144@debbugs.gnu.org, Christopher Baines To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mikael Djurfeldt Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sun May 05 18:43:01 2024 Return-path: Envelope-to: guile-bugs@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 1s3ex3-0000eh-Dn for guile-bugs@m.gmane-mx.org; Sun, 05 May 2024 18:43:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3ewi-0007c9-43; Sun, 05 May 2024 12:42:40 -0400 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 1s3ewg-0007bV-Ce for bug-guile@gnu.org; Sun, 05 May 2024 12:42:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3ewg-0005oc-4k for bug-guile@gnu.org; Sun, 05 May 2024 12:42:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3ex3-0001YY-LH for bug-guile@gnu.org; Sun, 05 May 2024 12:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 05 May 2024 16:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70144 X-GNU-PR-Package: guile Original-Received: via spool by 70144-submit@debbugs.gnu.org id=B70144.17149273315971 (code B ref 70144); Sun, 05 May 2024 16:43:01 +0000 Original-Received: (at 70144) by debbugs.gnu.org; 5 May 2024 16:42:11 +0000 Original-Received: from localhost ([127.0.0.1]:60596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3ewF-0001YF-AS for submit@debbugs.gnu.org; Sun, 05 May 2024 12:42:11 -0400 Original-Received: from jpoiret.xyz ([206.189.101.64]:36960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3ewA-0001Y9-Q9 for 70144@debbugs.gnu.org; Sun, 05 May 2024 12:42:09 -0400 Original-Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id EE59F185460; Sun, 5 May 2024 16:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1714927301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QNWeSZNJSxuBGa61xr7/iBD+tryViSMC0RzxA267Vhg=; b=Pfzitw2pFeUuFb/KH0Kru+k+At0YWBq4IBAZmKTFTks0qxlz9SeRohzJruTgv/aWK+JeD3 APpDjx8dmqRo7uec258xI9y1Q6UXyLUcSCcKCzvlnCSDbPCU+iIRPBD/JobPWqazNKMWcm TROLim0rvCloPkId30A3IOsCXM1NRvXVfRAgEMFAxb+KJOGZ4mqff2w+m3OlK6P3q/JSg2 p4/r9owktVjjZJZvxNaYsjaDIlwBRQHhFtsQFVkqorAtYldVLaZJJKTwAJctNqFfDxUaWd 7M/evoOrsefuqEBMku1ECtHqY5U66g6w1unyfcTiCWjEXiC+VFBS6+y5KQZaXw== In-Reply-To: <877cgcxppu.fsf@gnu.org> X-Spamd-Bar: -- Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10828 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, Ludovic Court=C3=A8s writes: > Unless I=E2=80=99m mistaken, we can remove the =E2=80=98scm_dynwind_sigac= tion=E2=80=99 calls > from =E2=80=98scm_system_star=E2=80=99: now that we use =E2=80=98posix_sp= awn=E2=80=99, this is all taken > care of. > > This can be seen by running: > > strace -o /tmp/log.strace -f guile -c '(system* "/bin/sh" "-c" "echo fo= o $$")' > > =E2=80=A6 which shows pre-fork signal blocking (this is > =E2=80=98internal_signal_block_all=E2=80=99 in spawni.c in glibc) followe= d, in the child > (PID 28592 here), by a long series of =E2=80=98sigaction=E2=80=99 calls t= o reset > handlers to their default behavior: > > --8<---------------cut here---------------start------------->8--- > 28586 rt_sigprocmask(SIG_BLOCK, ~[], [], 8) =3D 0 > 28586 clone3({flags=3DCLONE_VM|CLONE_VFORK, exit_signal=3DSIGCHLD, stack= =3D0x7f73b39b2000, stack_size=3D0x9000}, 88 > 28592 rt_sigprocmask(SIG_BLOCK, NULL, ~[KILL STOP], 8) =3D 0 > 28592 rt_sigaction(SIGHUP, NULL, {sa_handler=3DSIG_DFL, sa_mask=3D[], sa_= flags=3D0}, 8) =3D 0 > 28592 rt_sigaction(SIGHUP, {sa_handler=3DSIG_DFL, sa_mask=3D[], sa_flags= =3DSA_RESTORER, sa_restorer=3D0x7f73b432d2a0}, NULL, 8) =3D 0 > 28592 rt_sigaction(SIGINT, NULL, {sa_handler=3DSIG_IGN, sa_mask=3D[], sa_= flags=3DSA_RESTORER, sa_restorer=3D0x7f73b432d2a0}, 8) =3D 0 > 28592 rt_sigaction(SIGQUIT, NULL, {sa_handler=3DSIG_IGN, sa_mask=3D[], sa= _flags=3DSA_RESTORER, sa_restorer=3D0x7f73b432d2a0}, 8) =3D 0 > 28592 rt_sigaction(SIGILL, NULL, {sa_handler=3DSIG_DFL, sa_mask=3D[], sa_= flags=3D0}, 8) =3D 0 > 28592 rt_sigaction(SIGILL, {sa_handler=3DSIG_DFL, sa_mask=3D[], sa_flags= =3DSA_RESTORER, sa_restorer=3D0x7f73b432d2a0}, NULL, 8) =3D 0 > 28592 rt_sigaction(SIGTRAP, NULL, {sa_handler=3DSIG_DFL, sa_mask=3D[], sa= _flags=3D0}, 8) =3D 0 > 28592 rt_sigaction(SIGTRAP, {sa_handler=3DSIG_DFL, sa_mask=3D[], sa_flags= =3DSA_RESTORER, sa_restorer=3D0x7f73b432d2a0}, NULL, 8) =3D 0 > --8<---------------cut here---------------end--------------->8--- > > Josselin, can you confirm? Yes, I believe this is all taken care of by our use of posix_spawn (which was the point in the first place :) ). Best, =2D-=20 Josselin Poiret --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmY3tsIQHGRldkBqcG9p cmV0Lnh5egAKCRBQXkC5FhcaildpC/45yKKk5lGLESZTeGEeIJYMBW5ujQPyZ/nH 82n3rlKMD5mabZJkvKM5w8P7fORflPE85twvVPdt3Szs4Rzl8xiO/vevh6Rtxew5 QlaZJVlhQoAnCuwqo8OnADiBZeLI5E42bc6dU03LfEeSD+SwiZ2IQdrQYHJbS8sN sg/5MjUsKIJtAHouPFtBYUMkphsyGxjembMzmKOV+MjQ0KYN8zj9h5iqdIldjlvR jnDS2gMJtwQY0RKXN51qK1cT2G7bavV6xlJTv9fr067MXAQLGaF98Nsrl3P9cK7O Cl5KnnM1uvaHg9RV3quotHkhpQStE50ml9u25CjZqycIzaYzMEgOsJ0HRSj86Fyn HfYmOVtITPwpcrPYFD47sUfaan2aEF8c3z+a9xh1gG1qQAhZgDL4DDWYJhru+S4c bvC2W3P1WiDvoDyA5L0aTErOAOXbr9OjlNdRwFGCehHJY3EU+Xgc2cZaBmiwYuFH e3GJJyPN3c7C4IWtQqabyERHz/DZkuQ= =RTAu -----END PGP SIGNATURE----- --=-=-=--