https://kotlinlang.org logo
#coroutines
Title
# coroutines
b

Babacar Tall

01/18/2020, 8:19 PM
Hello, I'm a newcomer to Kotlin Flow (and my understanding is, unsurprisingly, limited) 🙂 ! I'm wondering if there's an elegant way (operators ?) to capture KeyboardInterrupt (Ctrl+C) exceptions and/or SIGKILL signals (and by scope) ? In order to implement treatments such as graceful reload for example. Thanks for your help 🙂
o

octylFractal

01/18/2020, 8:21 PM
is this in Kotlin/Native, /JS, or /JVM?
b

Babacar Tall

01/18/2020, 8:22 PM
Kotlin/JVM
o

octylFractal

01/18/2020, 8:24 PM
probably not then, there's no supported signal handling apis on the JVM to begin with
and certainly, not SIGKILL, which is impossible to catch: https://en.wikipedia.org/wiki/Signal_(IPC)#SIGKILL
b

Babacar Tall

01/18/2020, 8:39 PM
Thank you for this information on JVM signals, in addition to taking SIGKILL as a bad example ^^
5 Views