https://github.com/ainame/Swift-Daemon
daemonize your swift scripts
https://github.com/ainame/Swift-Daemon
Last synced: 12 months ago
JSON representation
daemonize your swift scripts
- Host: GitHub
- URL: https://github.com/ainame/Swift-Daemon
- Owner: ainame
- Created: 2017-03-03T05:31:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T07:11:09.000Z (about 9 years ago)
- Last Synced: 2025-04-07T23:51:10.485Z (about 1 year ago)
- Language: Swift
- Size: 2.93 KB
- Stars: 24
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-inspiration - Swift-Daemon
README
## Swift-Daemon
You can daemonize any swift process.
`Daemon` can detach your swift script from shell.
```swift
import Foundation
import Daemon
DispatchQueue(label: "foo").async {
while true {
print(".")
sleep(1)
}
}
Daemon.daemonize()
while true {
sleep(1)
}
```