{"id":18151250,"url":"https://github.com/msantos/pdeathsigexec","last_synced_at":"2025-07-28T09:41:20.254Z","repository":{"id":187471465,"uuid":"675631636","full_name":"msantos/pdeathsigexec","owner":"msantos","description":"signal process when parent exits","archived":false,"fork":false,"pushed_at":"2025-03-02T13:07:24.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T23:31:57.288Z","etag":null,"topics":["exec","prctl","procctl","signal"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msantos.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}},"created_at":"2023-08-07T11:16:12.000Z","updated_at":"2025-03-02T13:07:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfa61acd-c862-4c05-ab4d-cc7b9fa8ad0c","html_url":"https://github.com/msantos/pdeathsigexec","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"86cf3425c58bea671705111699fb7f0cbed332f3"},"previous_names":["msantos/pdeathsigexec"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msantos/pdeathsigexec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fpdeathsigexec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fpdeathsigexec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fpdeathsigexec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fpdeathsigexec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msantos","download_url":"https://codeload.github.com/msantos/pdeathsigexec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Fpdeathsigexec/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267496086,"owners_count":24097098,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["exec","prctl","procctl","signal"],"created_at":"2024-11-02T01:07:04.620Z","updated_at":"2025-07-28T09:41:19.132Z","avatar_url":"https://github.com/msantos.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SYNOPSIS\n\npdeathsigexec *cmd* *...*\n\n# DESCRIPTION\n\npdeathsigexec: signal process when parent exits\n\nSubprocesses orphaned by a parent process's exit are typically reparented\nto init (PID 1) and continue running. `pdeathsigexec` ensures a process\nreceives a signal upon its parent's termination.\n\nThe \"signal on parent termination\" behaviour applies\nto the executed process only and not descendents\n([prctl(2)](https://man7.org/linux/man-pages/man2/prctl.2.html)):\n\n\u003e The parent-death signal setting is cleared for the child of a fork(2). It\n\u003e is also (since Linux 2.4.36 / 2.6.23) cleared when executing a set-user-ID\n\u003e or set-group-ID binary, or a binary that has associated capabilities (see\n\u003e capabilities(7)); otherwise, this value is preserved across execve(2).\n\nThe behaviour can be set for related, dynamically linked processes in\na supervision tree by using a `LD_PRELOAD` library (see `EXAMPLES`).\n\n# EXAMPLES\n\n```\n$ sh -c \"sleep inf\" \u0026\n[1] 25880\n$ kill -9 25880\n$ pgrep -fa sleep\n25882 sleep inf\n```\n\n## pdeathsigexec\n\n```\n$ sh -c \"pdeathsigexec sleep inf\" \u0026\n[1] 25926\n$ kill -9 25926\n$ pgrep -fa sleep\n\u003cno output\u003e\n```\n\n## libpdeathsigexec\n\n```\n$ LD_PRELOAD=libpdeathsigexec.so sh -c 'sh -c \"sleep inf\" \u0026 sleep inf' \u0026\n[1] 25987\n$ kill -9 25987\n$ pgrep -fa sleep\n\u003cno output\u003e\n```\n\n# Build\n\n```\nmake\n\n#### static executable using musl\n## sudo apt install musl-dev musl-tools\n./musl-make\n```\n\n# OPTIONS\n\n## pdeathsigexec\n\n-s/--signal\n: set the termination signal (default `9` (SIGKILL))\n\n# ENVIRONMENT VARIABLES\n\nPDEATHSIGEXEC_SIGNAL\n: set the termination signal (default `9` (SIGKILL))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsantos%2Fpdeathsigexec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsantos%2Fpdeathsigexec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsantos%2Fpdeathsigexec/lists"}