arrow-kt / arrow-kt/arrow

[Bug] SuspendApp freezes app on System.exit

Open
#3,846 1 comment 1 reaction 1 assignee Claimed by @nomisRev View on GitHub
Dominant language
Kotlin
Stars
6.6k
Forks
472
Avg merge
3d 49m
Merged PRs (30d)
4

Description

```kotlin
import arrow.continuations.SuspendApp

fun main(args: Array) =
SuspendApp {
System.exit(1)
}
```

This main completely freezes the process, needing an external `SIGKILL` to stop.

Maybe I'm doing something wrong, and also I realize that `System.exit` inside SuspendApp's passed-in closure may be a bad idea, but this isn't necessarily under the user's control.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.