Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118687 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 74170 invoked from network); 22 Sep 2022 12:55:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Sep 2022 12:55:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CF9A1180553 for ; Thu, 22 Sep 2022 05:55:56 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 22 Sep 2022 05:55:56 -0700 (PDT) Received: by mail-ej1-f46.google.com with SMTP id hy2so17162730ejc.8 for ; Thu, 22 Sep 2022 05:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunglas-dev.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=OJ8K5d6N5nNdhZkBGR+OZ7s4khHf4wa0P8JlPVmwRqg=; b=SnE6pLnzOvs47Yl0UKd+7w0hlcLQoSRP4QBem6l0SwTqFgTKuceu2rA5VNBwaklm6e ZSOAX0fuDqFeCs3IJoh0Tg4tVThgP2wCa2RXuejM33q5dcoBff8WHdkVJPG14mgXuC4C WeiFK4/J13/0JWEDtrXRQngKgyAqIzjcudQ33NmLkj4mfFswotVvHLu3znAVo6voFEj/ N6ViEnt2gVHEfNkgP2aeQyjVqqiYhTyhCR+bdr66Woh7XmrpuMDNf/NP2VSKKgwFO7K1 bG23B70P2X9XDCKjitNbcdv3eT3chZjwbj4mCzdw6OKUkgJ0XYdQuCIZSEdPoNqtn5rU fGTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=OJ8K5d6N5nNdhZkBGR+OZ7s4khHf4wa0P8JlPVmwRqg=; b=v2OFVZeBb+7xpqyc9P6S85AYTFNLccOzIVmDfamV+vqtMdNjACm0vQuiz4+YC4cvTL de2az78bTTdiYjSFiEb1aA9T2eP73U7Nte0lgdGVprwiOz0VpKRWe+JnuCEQnP9GbBC5 rlanRyyOvOrZqFVQATe4G0tV4aGzh3WwPCINBvpnSbE20DBHotUK6c97SfmEZ6yNvVUr 05cQN3XVrOtCcWBCWOhp3MzPMdMf43MvK3nWl1HmA982+ZxPlCyBqzcYMBWP+gDp/UDY m3cudd0EKhi0e/boUJ0Gbs8PjXTWCGGooCI8rJjusFhNfiVFl3qK+4VlxffZsXGRNQmr ddYg== X-Gm-Message-State: ACrzQf2gpytTWeFQyH+TvtAifWlAlbDLmp5tZ7aQY9u2vnS3nNTsHjRN LzW/cAuWgwSUL01HI3J0oywF7XozpzDIn/Pnen2Q17Php7gyYg== X-Google-Smtp-Source: AMsMyM4ozSgQ2UpDjpx1KhuaQq1QwOEDK4FCrKPhrjy9CboVQQt/N+LC6E3+gWmc2XUOq+eAWlLI4q0l+aWCL97MiA0= X-Received: by 2002:a17:907:743:b0:740:ef93:2ffc with SMTP id xc3-20020a170907074300b00740ef932ffcmr2710849ejb.514.1663851355040; Thu, 22 Sep 2022 05:55:55 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 22 Sep 2022 14:55:44 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000fa033f05e94394a9" Subject: Set SA_ONSTACK in zend_sigaction External From: kevin@dunglas.dev (=?UTF-8?Q?K=C3=A9vin_Dunglas?=) --000000000000fa033f05e94394a9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, internals! It's been a while. I'm currently working on a new SAPI for web servers written in Go. Many virtual machines, including Go ( https://pkg.go.dev/os/signal#hdr-Go_programs_that_use_cgo_or_SWIG), depend on signals using SA_ONSTACK ( https://man7.org/linux/man-pages/man2/sigaltstack.2.html). This flag allows a thread to define a new alternate signal stack. Many argue that SA_ONSTACK should be a default, but it's not the case (yet). Python merged a patch setting SA_ONSTACK in 2021 (Python 3.10+) for the same reasons (https://bugs.python.org/issue43390 / https://github.com/python/cpython/commit/02ac6f41e5569ec28d625bb005155903f6= 4cc9ee), with no issues. I opened a Pull Request to set this flag by default and tested it successfully with my Go SAPI: https://github.com/php/php-src/pull/9597 As this is technically at the limit between a new feature and a bug fix (having the ability to call Go/C++ VM code from PHP and embed PHP in such programs), should I open an RFC? Also, if merging my patch is considered, which branch should I target? Cheers, --=20 K=C3=A9vin Dunglas --000000000000fa033f05e94394a9--