{"id":20145790,"url":"https://github.com/jonathanhood/daemon_examples","last_synced_at":"2026-07-04T10:31:14.549Z","repository":{"id":29236646,"uuid":"32768628","full_name":"jonathanhood/daemon_examples","owner":"jonathanhood","description":null,"archived":false,"fork":false,"pushed_at":"2015-03-30T18:17:14.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T01:14:31.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanhood.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-24T01:25:58.000Z","updated_at":"2015-03-30T18:17:14.000Z","dependencies_parsed_at":"2022-07-12T14:40:27.625Z","dependency_job_id":null,"html_url":"https://github.com/jonathanhood/daemon_examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonathanhood/daemon_examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhood%2Fdaemon_examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhood%2Fdaemon_examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhood%2Fdaemon_examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhood%2Fdaemon_examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanhood","download_url":"https://codeload.github.com/jonathanhood/daemon_examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhood%2Fdaemon_examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35118970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-13T22:18:10.922Z","updated_at":"2026-07-04T10:31:14.523Z","avatar_url":"https://github.com/jonathanhood.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"daemon-examples\n===============\n\nSeveral small implementations of a unix daemon in various languages. They \neach follow the process of:\n\n1. Forking to create a subprocess\n2. Calling setsid to accomplish various items\n   1. Create a new session\n   2. Become leader of the new process group\n   3. Remove any controlling tty\n3. Forking again to avoid acquiring a tty again\n4. Redirecting stdout, stderr to a log file\n5. Setting stdin to /dev/null\n6. Writing a pidfile\n7. Closing all open non-std file descriptors (if necessary)\n8. Running some \"useful\" code\n\nMissing Pieces\n==============\n\n1. None of the implementations here cd to /, which is recommened to avoid\n   daemon execution inside a mounted volume.\n2. Setting umask appropriately\n3. Changing to an appropriate user for the daemon to run as\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanhood%2Fdaemon_examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanhood%2Fdaemon_examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanhood%2Fdaemon_examples/lists"}