{"id":17099826,"url":"https://github.com/cppcoffee/vfork-rs","last_synced_at":"2026-05-17T02:34:00.088Z","repository":{"id":196332570,"uuid":"695751345","full_name":"cppcoffee/vfork-rs","owner":"cppcoffee","description":"vfork-rs is used in embedded low memory to run an external program.","archived":false,"fork":false,"pushed_at":"2023-09-24T09:08:46.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-25T17:05:36.108Z","etag":null,"topics":["embedded","vfork"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/cppcoffee.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,"governance":null}},"created_at":"2023-09-24T05:26:12.000Z","updated_at":"2023-09-24T09:03:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"de3fd73e-ee50-4e21-831b-e4b6165985d8","html_url":"https://github.com/cppcoffee/vfork-rs","commit_stats":null,"previous_names":["cppcoffee/vfork-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fvfork-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fvfork-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fvfork-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fvfork-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cppcoffee","download_url":"https://codeload.github.com/cppcoffee/vfork-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245147599,"owners_count":20568536,"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":["embedded","vfork"],"created_at":"2024-10-14T15:11:31.378Z","updated_at":"2025-10-26T13:06:06.780Z","avatar_url":"https://github.com/cppcoffee.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vfork-rs\n\n`vfork-rs` is used in embedded low memory to run an external program and read the stdout output.\n\nJust like the name, the `vfork-rs` uses the linux `vfork` syscall. the `vfork` syscall is used to create new processes without copying the page tables of the parent process. \n\n\n## Notice\n\nUsed in linux only.\n\n## Usage\n\n```rust\nuse vfork::Command;\n\nfn main() {\n    let s = \"hello, world!\";\n    let mut cmd = Command::new(\"/bin/echo\")\n        .arg(s)\n        .spawn()\n        .expect(\"failed to execute process\");\n\n    let status_code = cmd.wait().expect(\"failed to wait process\");\n    assert_eq!(0, status_code.code());\n\n    let output = cmd.output().expect(\"failed to get output\");\n    assert_eq!(String::from_utf8_lossy(\u0026output), s);\n}\n```\n\n## Reference\n\n[https://man7.org/linux/man-pages/man2/vfork.2.html](https://man7.org/linux/man-pages/man2/vfork.2.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Fvfork-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppcoffee%2Fvfork-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Fvfork-rs/lists"}