Skip to content

Commit b23b738

Browse files
committed
8344646: The libjsig deprecation warning should go to stderr not stdout
Backport-of: efeacfee015d1105dcd75e489d367a7716441fa8
1 parent d42b931 commit b23b738

File tree

1 file changed

+4
-4
lines changed
  • src/java.base/unix/native/libjsig

1 file changed

+4
-4
lines changed

src/java.base/unix/native/libjsig/jsig.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -102,9 +102,9 @@ static sa_handler_t call_os_signal(int sig, sa_handler_t disp,
102102

103103
if (os_signal == NULL) {
104104
// Deprecation warning first time through
105-
printf(HOTSPOT_VM_DISTRO " VM warning: the use of signal() and sigset() "
106-
"for signal chaining was deprecated in version 16.0 and will "
107-
"be removed in a future release. Use sigaction() instead.\n");
105+
fprintf(stderr, HOTSPOT_VM_DISTRO " VM warning: the use of signal() and sigset() "
106+
"for signal chaining was deprecated in version 16.0 and will "
107+
"be removed in a future release. Use sigaction() instead.\n");
108108
if (!is_sigset) {
109109
os_signal = (signal_function_t)dlsym(RTLD_NEXT, "signal");
110110
} else {

0 commit comments

Comments
 (0)