Does the Kotlin Native version of the Kotlin Stand...
# kotlin-native
n
Does the Kotlin Native version of the Kotlin Standard lib have functionality to intercept process interrupts/signals (eg when a user presses Ctrl+C)? Want to intercept a keyboard interrupt event, and cleanup resources before exiting the program.
o
not standard library, but nothing prevents you from setting signal handler using POSIX platform library. Note, that in many cases https://github.com/JetBrains/kotlin-native/blob/a85b474fd0372fff99b05884300cc237cd85b47e/runtime/src/main/kotlin/kotlin/native/Runtime.kt#L36 is what you indeed need.
🙏 1
👍 1