From efeacfee015d1105dcd75e489d367a7716441fa8 Mon Sep 17 00:00:00 2001 From: David Holmes Date: Thu, 21 Nov 2024 21:18:18 +0000 Subject: [PATCH] 8344646: The libjsig deprecation warning should go to stderr not stdout Reviewed-by: mikael, cjplummer --- src/java.base/unix/native/libjsig/jsig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java.base/unix/native/libjsig/jsig.c b/src/java.base/unix/native/libjsig/jsig.c index 180dd583393..ebb4d698946 100644 --- a/src/java.base/unix/native/libjsig/jsig.c +++ b/src/java.base/unix/native/libjsig/jsig.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -95,9 +95,9 @@ static sa_handler_t call_os_signal(int sig, sa_handler_t disp, if (os_signal == NULL) { // Deprecation warning first time through - printf(HOTSPOT_VM_DISTRO " VM warning: the use of signal() and sigset() " - "for signal chaining was deprecated in version 16.0 and will " - "be removed in a future release. Use sigaction() instead.\n"); + fprintf(stderr, HOTSPOT_VM_DISTRO " VM warning: the use of signal() and sigset() " + "for signal chaining was deprecated in version 16.0 and will " + "be removed in a future release. Use sigaction() instead.\n"); if (!is_sigset) { os_signal = (signal_function_t)dlsym(RTLD_NEXT, "signal"); } else {