{"id":20145790,"url":"https://github.com/jonathanhood/daemon_examples","last_synced_at":"2025-10-11T01:14:33.624Z","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":2,"default_branch":"master","last_synced_at":"2025-01-13T11:11:10.331Z","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,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587846,"owners_count":19986628,"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-11-13T22:18:10.922Z","updated_at":"2025-10-11T01:14:28.572Z","avatar_url":"https://github.com/jonathanhood.png","language":"Shell","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","funding_links":[],"categories":[],"sub_categories":[],"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"}