We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 321280c commit a7cbad8Copy full SHA for a7cbad8
kotlinx-coroutines-debug/src/AgentPremain.kt
@@ -21,7 +21,13 @@ internal object AgentPremain {
21
private fun installSignalHandler() {
22
try {
23
Signal.handle(Signal("TRAP")) { // kill -5
24
- DebugProbes.dumpCoroutines()
+ if (DebugProbes.isInstalled) {
25
+ // Case with 'isInstalled' changed between this check-and-act is not considered
26
+ // a real debug probes use-case, thus is not guarded against.
27
+ DebugProbes.dumpCoroutines()
28
+ } else {
29
+ println("""Cannot perform coroutines dump, debug probes are disabled""")
30
+ }
31
}
32
} catch (t: Throwable) {
33
System.err.println("Failed to install signal handler: $t")
0 commit comments