libjsig deprecation warning, lenience for signal(SIGPIPE, SIG_IGN)?
Thomas Stüfe
thomas.stuefe at gmail.com
Fri Apr 11 05:55:15 UTC 2025
Hi Mikael,
I think that makes sense.
I actually missed that we deprecated signal(). Seeing that libjsig
interfaces with third-party code that neither we nor typically our
customers have control over, I am surprised we did that.
Cheers, Thomas
On Fri, Apr 11, 2025 at 7:01 AM Mikael Sterner <msterner at openjdk.mxy.se>
wrote:
> Hi,
>
> During migration of a desktop software from Java 11 to
> Java 21 we started seeing the libjsig deprecation warnings.
> That's fine and appreciated as a heads-up, and I also notice
> that some nice changes to the message logic have been done
> for Java 25.
>
> However, tracing what triggered our warnings, I wonder if you
> think it could make sense to be lenient about calls to deprecated
> signal() method that just want to ignore a signal with SIG_IGN,
> in particular SIGPIPE? This pattern seems to be used in several
> Gnome libraries:
>
> -
> https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkmain.c?ref_type=heads#L555
> -
> https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gsocket.c?ref_type=heads#L967
> -
> https://gitlab.gnome.org/GNOME/gvfs/-/blob/master/client/gdaemonvfs.c#L304
>
> Or would it be better to report such calls as deficiencies in
> these libraries, with the libjsig warnings as evidence?
>
> Yours,
> Mikael Sterner
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-runtime-dev/attachments/20250411/1d5a0374/attachment.htm>
More information about the hotspot-runtime-dev
mailing list