Re: Set SA_ONSTACK in zend_sigaction External
| From: | Joe Watkins | Date: | Thu, 22 Sep 2022 13:15:06 +0000 |
| Subject: | Re: Set SA_ONSTACK in zend_sigaction External | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118688@lists.php.net to get a copy of this message | ||
Hi Kevin,
Master should be targeted, no RFC is required, and the patch looks fine to
me.
Cheers
Joe
On Thu, 22 Sep 2022, 14:56 Kévin Dunglas, <kevin@dunglas.dev> wrote:
> 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/02ac6f41e5569ec28d625bb005155903f64cc9ee
> ),
> 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,
> --
> Kévin Dunglas
>