{"id":21337808,"url":"https://github.com/freeslave/detached","last_synced_at":"2026-02-03T21:31:52.482Z","repository":{"id":71413279,"uuid":"68225110","full_name":"FreeSlave/detached","owner":"FreeSlave","description":"D library for spawning detached processes","archived":false,"fork":false,"pushed_at":"2021-06-13T11:13:37.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T02:15:10.353Z","etag":null,"topics":["d","dlang","process"],"latest_commit_sha":null,"homepage":"","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FreeSlave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_1_0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-14T16:51:37.000Z","updated_at":"2024-08-29T03:28:03.000Z","dependencies_parsed_at":"2023-02-28T15:01:21.558Z","dependency_job_id":null,"html_url":"https://github.com/FreeSlave/detached","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/FreeSlave/detached","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fdetached","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fdetached/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fdetached/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fdetached/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FreeSlave","download_url":"https://codeload.github.com/FreeSlave/detached/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fdetached/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29058267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T20:13:53.544Z","status":"ssl_error","status_checked_at":"2026-02-03T20:13:40.507Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["d","dlang","process"],"created_at":"2024-11-22T00:01:39.867Z","updated_at":"2026-02-03T21:31:52.451Z","avatar_url":"https://github.com/FreeSlave.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Detached\n\nSpawn detached processes in D.\n\n**Note**: Phobos got this kind of functionality in version 2.076, so this library is no longer needed. Use [spawnProcess](http://dlang.org/phobos/std_process.html#.spawnProcess) with *Config.detached* flag instead. If *Config.detached* is available during the compilation this library fallbacks to the Phobos version.\n\n[![Build Status](https://github.com/FreeSlave/detached/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/FreeSlave/detached/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/FreeSlave/detached/badge.svg?branch=master)](https://coveralls.io/github/FreeSlave/detached?branch=master)\n\nBefore version 2.076 standard D library did not provide a way to start detached process and required to [wait](http://dlang.org/phobos/std_process.html#.wait) on a returned Pid. \nWithout waiting you would have got zombie processes (resource leakage) if parent process outlives its child.\n\n**detached** solves this problem by introducing the *spawnProcessDetached* function \nwhich has almost the same API as [spawnProcess](http://dlang.org/phobos/std_process.html#.spawnProcess).\n\n## Features\n\n* Run process detached, i.e. with no need to *wait*.\n* Actually reports errors from exec- functions unlike *spawnProcess* which just checks if executable and working directory exist before fork and hopes their states leave unchanged before exec. (Note: this is no longer the case. It was fixed in phobos 2.075)\n\n## Missing features\n\n* A way to close standard streams in spawned process (e.g. for daemon creation).\n\n## Examples\n\n### [Spawn](examples/spawn/source/app.d)\n\nSimple program demonstrating the usage of spawnProcessDetached.\n\n```\ndub run :spawn  -- --workdir=/usr/local -- pwd\ndub run :spawn  -- --stdout=/dev/null --stderr=/dev/null -- vlc\ndub run :spawn -- -v HELLO=WORLD -- sh -c 'echo $HELLO'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreeslave%2Fdetached","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreeslave%2Fdetached","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreeslave%2Fdetached/lists"}