Join Slack
Communities
Powered by
Does the Kotlin Native version of the Kotlin Stand...
# kotlin-native
n
napperley
05/26/2019, 4:00 AM
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
olonho
05/26/2019, 7:43 AM
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
13
Views
Open in Slack
Previous
Next