{"id":13690251,"url":"https://github.com/hanjoes/swift-daemon","last_synced_at":"2025-07-21T08:03:34.687Z","repository":{"id":85047703,"uuid":"191292318","full_name":"hanjoes/swift-daemon","owner":"hanjoes","description":"Daemonize a given routine.","archived":false,"fork":false,"pushed_at":"2019-06-13T16:41:25.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-23T01:40:22.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanjoes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-06-11T04:15:21.000Z","updated_at":"2019-06-13T16:41:26.000Z","dependencies_parsed_at":"2023-03-08T17:30:36.762Z","dependency_job_id":null,"html_url":"https://github.com/hanjoes/swift-daemon","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hanjoes/swift-daemon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanjoes%2Fswift-daemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanjoes%2Fswift-daemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanjoes%2Fswift-daemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanjoes%2Fswift-daemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanjoes","download_url":"https://codeload.github.com/hanjoes/swift-daemon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanjoes%2Fswift-daemon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266263056,"owners_count":23901355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T16:00:50.763Z","updated_at":"2025-07-21T08:03:34.662Z","avatar_url":"https://github.com/hanjoes.png","language":"Swift","funding_links":[],"categories":["Daemon"],"sub_categories":[],"readme":"# SwiftDaemon\n\nDaemonize a given routine.\n\n__\"fork\"__ is \"hidden\" from user by Swift, I stole a piece of code from project [Curassow](https://github.com/kylef-archive/Curassow) to re-surface the \"fork\" system call in Swift.\n\n# Usage\n\n```Swift\nimport SwiftDaemon\n\nSwiftDaemon.daemonize(inDir: \"/tmp\") {\n  let fd = fopen(\"SwiftDaemonTest.log\", \"w\")\n  defer { fclose(fd) }\n  for _ in 1...10 {\n    usleep(1000000)\n    let content = \"Test\\n\"\n    fwrite(content, 1, content.count, fd)\n    fflush(fd)\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanjoes%2Fswift-daemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanjoes%2Fswift-daemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanjoes%2Fswift-daemon/lists"}