{"id":33918739,"url":"https://github.com/nu11ptr/send_ctrlc","last_synced_at":"2026-03-17T22:12:04.334Z","repository":{"id":322901695,"uuid":"1091342651","full_name":"nu11ptr/send_ctrlc","owner":"nu11ptr","description":"Cross platform crate for sending interrupts/ctrl-c to child processes","archived":false,"fork":false,"pushed_at":"2025-11-15T15:35:54.000Z","size":33,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-13T14:41:39.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/nu11ptr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-06T22:20:06.000Z","updated_at":"2025-11-19T14:21:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nu11ptr/send_ctrlc","commit_stats":null,"previous_names":["nu11ptr/send_ctrlc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nu11ptr/send_ctrlc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fsend_ctrlc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fsend_ctrlc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fsend_ctrlc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fsend_ctrlc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nu11ptr","download_url":"https://codeload.github.com/nu11ptr/send_ctrlc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fsend_ctrlc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"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":[],"created_at":"2025-12-12T08:31:25.440Z","updated_at":"2026-03-17T22:12:04.326Z","avatar_url":"https://github.com/nu11ptr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# send_ctrlc\n\n[![Crate](https://img.shields.io/crates/v/send_ctrlc)](https://crates.io/crates/send_ctrlc)\n[![Docs](https://docs.rs/send_ctrlc/badge.svg)](https://docs.rs/send_ctrlc)\n[![Build](https://github.com/nu11ptr/send_ctrlc/workflows/CI/badge.svg)](https://github.com/nu11ptr/send_ctrlc/actions)\n[![codecov](https://codecov.io/github/nu11ptr/send_ctrlc/graph/badge.svg?token=3M5tvBewE5)](https://codecov.io/github/nu11ptr/send_ctrlc)\n\nA cross platform crate for interrupting or terminating child processes\n\n## Install\n\n```shell\ncargo add send_ctrlc\n# Or for async/tokio:\ncargo add send_ctrlc -F tokio\n```\n\n## Features\n\n* Cross platform (including Windows)\n* Uniform cross platform API\n* Both sync and async\n* Only 2 unsafe calls\n* Minimal dependencies: \n    * Synchronous: `libc` on unix, and `windows-sys` on windows\n    * Asynchronous: `tokio` (with only `process` feature)\n\n## Examples\n\n\u003e The first example below is for synchronous use cases and the second for tokio/async use cases. However, both `interrupt` and `terminate` are available for both sync/async code.\n\n```rust\nuse send_ctrlc::{Interruptible as _, InterruptibleCommand as _};\n\n// Interrupt example\n\n#[cfg(not(feature = \"tokio\"))]\nfn main() {\n        // Create a continuous ping standard command\n        let mut command = std::process::Command::new(\"ping\");\n        #[cfg(windows)]\n        command.arg(\"-t\");\n        command.arg(\"127.0.0.1\");\n\n        // Spawn the ping, interrupt it, and wait for it to complete\n        let mut child = command.spawn_interruptible().unwrap();\n        child.interrupt().unwrap();\n        child.wait().unwrap();\n}\n\n// Terminate example (async/tokio)\n\n#[cfg(feature = \"tokio\")]\n#[tokio::main]\nasync fn main() {\n        // Create a continuous ping standard command\n        let mut command = tokio::process::Command::new(\"ping\");\n        #[cfg(windows)]\n        command.arg(\"-t\");\n        command.arg(\"127.0.0.1\");\n\n        // Spawn the ping, interrupt it, and wait for it to complete\n        let mut child = command.spawn_interruptible().unwrap();\n        child.terminate().unwrap();\n        child.wait().await.unwrap();\n}\n```\n\n## Contributions\n\nContributions are welcome as long they align with the vision for this crate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu11ptr%2Fsend_ctrlc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnu11ptr%2Fsend_ctrlc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu11ptr%2Fsend_ctrlc/lists"}