{"id":16752686,"url":"https://github.com/luser/spawn-ptrace","last_synced_at":"2025-04-10T15:52:38.995Z","repository":{"id":56338210,"uuid":"70826349","full_name":"luser/spawn-ptrace","owner":"luser","description":"A Rust crate for spawning a Linux process with ptrace enabled","archived":false,"fork":false,"pushed_at":"2020-11-13T14:53:14.000Z","size":14,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-08T00:03:40.793Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/luser.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}},"created_at":"2016-10-13T16:31:59.000Z","updated_at":"2024-01-29T14:08:35.000Z","dependencies_parsed_at":"2022-08-15T16:50:50.479Z","dependency_job_id":null,"html_url":"https://github.com/luser/spawn-ptrace","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fspawn-ptrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fspawn-ptrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fspawn-ptrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fspawn-ptrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luser","download_url":"https://codeload.github.com/luser/spawn-ptrace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248245480,"owners_count":21071497,"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-10-13T02:47:48.397Z","updated_at":"2025-04-10T15:52:38.977Z","avatar_url":"https://github.com/luser.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/luser/spawn-ptrace.svg?branch=master)](https://travis-ci.org/luser/spawn-ptrace) [![crates.io](https://img.shields.io/crates/v/spawn-ptrace.svg)](https://crates.io/crates/spawn-ptrace) [![](https://docs.rs/spawn-ptrace/badge.svg)](https://docs.rs/spawn-ptrace)\n\nThis crate allows you to spawn a child process with [`ptrace`](https://man7.org/linux/man-pages/man2/ptrace.2.html) enabled. It provides a single trait—`CommandPtraceSpawn`—that is implemented for `std::process::Command`, giving you access to a `spawn_ptrace` method.\n\nProcesses spawned this way will be stopped with `SIGTRAP` from their `exec`, so you can perform any early intervention you require prior to the process running any code and then use `PTRACE_CONT` to resume its execution.\n\n# Example\n\n```rust,no_run\nuse std::io;\nuse spawn_ptrace::CommandPtraceSpawn;\nuse std::process::Command;\n\nfn main() -\u003e io::Result\u003c()\u003e {\n   let child = Command::new(\"/bin/ls\").spawn_ptrace()?;\n   // call `ptrace(PTRACE_CONT, child.id(), ...)` to continue execution\n   // do other ptrace things here...\n   Ok(())\n}\n```\n\nFor a practical example of this crate's usage, see my [`tracetree`](https://github.com/luser/tracetree) tool.\n\n# License\n\nThis software is provided under the MIT license. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluser%2Fspawn-ptrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluser%2Fspawn-ptrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluser%2Fspawn-ptrace/lists"}