Skip to content

Commit efeacfe

Browse files
author
David Holmes
committed
8344646: The libjsig deprecation warning should go to stderr not stdout
Reviewed-by: mikael, cjplummer
1 parent 2214906 commit efeacfe

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
*
@@ -95,9 +95,9 @@ static sa_handler_t call_os_signal(int sig, sa_handler_t disp,
9595

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

0 commit comments

Comments
 (0)