https://github.com/leavez/cleanquit
Kill all children processes when main program ends.
https://github.com/leavez/cleanquit
Last synced: over 1 year ago
JSON representation
Kill all children processes when main program ends.
- Host: GitHub
- URL: https://github.com/leavez/cleanquit
- Owner: leavez
- License: mit
- Created: 2020-03-17T07:58:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T08:09:10.000Z (over 5 years ago)
- Last Synced: 2025-01-28T05:27:02.850Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CleanQuit
Kill all children processes when main program ends.
Children processes may be create by `Process` class, which usually used to call shell commands. When the main swift processes killed by ctr+c, the children processes won't be killed and become an orphan process owned by pid 1.
This lib provides a method to kill all direct children processes automatically when process exit or be killed by signal.
## Usage
SPM
```
.package(url: "https://github.com/leavez/CleanQuit.git", from: "1.0.0"),
```
```
import CleanQuit
CleanQuit.enable()
```