libjsig deprecation warning, lenience for signal(SIGPIPE, SIG_IGN)?

Thomas Stüfe thomas.stuefe at gmail.com
Mon Apr 14 05:48:45 UTC 2025


On Mon, Apr 14, 2025 at 1:41 AM David Holmes <david.holmes at oracle.com>
wrote:

> On 11/04/2025 3:55 pm, Thomas Stüfe wrote:
> > Hi Mikael,
> >
> > I think that makes sense.
> >
> > I actually missed that we deprecated signal().
>
> No you didn't :) You've just forgotten:
>
> https://bugs.openjdk.org/browse/JDK-8257572
>
>
:-D


> Cheers,
> David
> -----
>
>
>
> >  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
> > <mailto: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/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/glib/-/blob/
> >     main/gio/gsocket.c?ref_type=heads#L967>
> >       - https://gitlab.gnome.org/GNOME/gvfs/-/blob/master/client/
> >     gdaemonvfs.c#L304 <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/20250414/a3107006/attachment.htm>


More information about the hotspot-runtime-dev mailing list