1
1
/*
2
- * Copyright (c) 2020, 2022 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2020, 2023 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -921,8 +921,6 @@ void os::run_periodic_checks(outputStream* st) {
921
921
print_handlers |= check_signal_handler (SIGILL);
922
922
print_handlers |= check_signal_handler (SIGFPE);
923
923
print_handlers |= check_signal_handler (SIGBUS);
924
- print_handlers |= check_signal_handler (SIGPIPE);
925
- print_handlers |= check_signal_handler (SIGXFSZ);
926
924
PPC64_ONLY (print_handlers |= check_signal_handler (SIGTRAP);)
927
925
928
926
// ReduceSignalUsage allows the user to override these handlers
@@ -936,6 +934,9 @@ void os::run_periodic_checks(outputStream* st) {
936
934
937
935
print_handlers |= check_signal_handler (PosixSignals::SR_signum);
938
936
937
+ // As we ignore SIGPIPE and SIGXFSZ, and expect other code to potentially
938
+ // install handlers for them, we don't bother checking them here.
939
+
939
940
if (print_handlers) {
940
941
// If we had a mismatch:
941
942
// - print all signal handlers. As part of that printout, details will be printed
@@ -1274,7 +1275,13 @@ void set_signal_handler(int sig) {
1274
1275
// Save handler setup for possible later checking
1275
1276
vm_handlers.set (sig, &sigAct);
1276
1277
1277
- do_check_signal_periodically[sig] = true ;
1278
+ bool do_check = true ;
1279
+ if (sig == SIGPIPE || sig == SIGXFSZ) {
1280
+ // As we ignore these signals, and expect other code to potentially
1281
+ // install handlers for them, we don't bother checking them.
1282
+ do_check = false ;
1283
+ }
1284
+ do_check_signal_periodically[sig] = do_check;
1278
1285
#ifdef ASSERT
1279
1286
void * oldhand2 = get_signal_handler (&oldAct);
1280
1287
assert (oldhand2 == oldhand, " no concurrent signal handler installation" );
0 commit comments