Ruby: prevented a segfault on receiving SIGINT (^C).

As was reported[0] by @travisbell on GitHub, if running unit from the
terminal in the foreground when hitting ^C to exit it, the ruby
application processes would segfault if they were using threads.

It's not 100% clear where the actual problem lies, but it _looks_ like
it may be in ruby.

The simplest way to deal with this for now is to just ignore SIGINT in
the ruby application processes. Unit will still receive and handle it,
cleanly shutting everything down.

For people who want to handle SIGINT in their ruby application running
under unit they can still trap SIGINT and it will override the ignore.

[0]: https://github.com/nginx/unit/issues/562#issuecomment-1223229585

Closes: https://github.com/nginx/unit/issues/562
This commit is contained in:
Andrew Clayton
2022-08-31 12:49:15 +01:00
parent d1cb8ab2bb
commit b26624fc10
2 changed files with 8 additions and 0 deletions

View File

@@ -105,6 +105,12 @@ the ruby application process could crash if it's interrupted by SIGTERM signal.
</para>
</change>
<change type="bugfix">
<para>
prevent the ruby application processes from crashing on SIGINT (^C).
</para>
</change>
<change type="bugfix">
<para>
when isolated PID numbers reach the prototype process host PID,