Blocks the IMPALA_SHUTDOWN_SIGNAL signal. Should be called by the process before spawning any other threads to make sure it gets blocked in all threads and will only be caught by the thread waiting on it.
| 310 | // spawning any other threads to make sure it gets blocked in all threads and will only be |
| 311 | // caught by the thread waiting on it. |
| 312 | void BlockImpalaShutdownSignal() { |
| 313 | const string error_msg = "Failed to block IMPALA_SHUTDOWN_SIGNAL for all threads."; |
| 314 | sigset_t signals; |
| 315 | AbortIfError(sigemptyset(&signals), error_msg); |
| 316 | AbortIfError(sigaddset(&signals, IMPALA_SHUTDOWN_SIGNAL), error_msg); |
| 317 | AbortIfError(pthread_sigmask(SIG_BLOCK, &signals, nullptr), error_msg); |
| 318 | } |
| 319 | |
| 320 | // Returns Java major version, such as 8, 11, or 17. |
| 321 | static int GetJavaMajorVersion() { |
no test coverage detected