{"id":13725136,"url":"https://github.com/pkrumins/node-tree-kill","last_synced_at":"2025-05-15T12:02:30.818Z","repository":{"id":37677741,"uuid":"9359042","full_name":"pkrumins/node-tree-kill","owner":"pkrumins","description":"kill trees of processes","archived":false,"fork":false,"pushed_at":"2020-06-17T22:45:25.000Z","size":34,"stargazers_count":343,"open_issues_count":21,"forks_count":38,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-03T07:46:48.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/pkrumins.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":"2013-04-11T00:35:09.000Z","updated_at":"2025-02-27T00:15:19.000Z","dependencies_parsed_at":"2022-07-15T21:48:07.101Z","dependency_job_id":null,"html_url":"https://github.com/pkrumins/node-tree-kill","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkrumins%2Fnode-tree-kill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkrumins%2Fnode-tree-kill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkrumins%2Fnode-tree-kill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkrumins%2Fnode-tree-kill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkrumins","download_url":"https://codeload.github.com/pkrumins/node-tree-kill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254077088,"owners_count":22010658,"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-08-03T01:02:13.949Z","updated_at":"2025-05-15T12:02:30.536Z","avatar_url":"https://github.com/pkrumins.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"Tree Kill\n=========\n\nKill all processes in the process tree, including the root process.\n\nExamples\n=======\n\nKill all the descendent processes of the process with pid `1`, including the process with pid `1` itself:\n```js\nvar kill = require('tree-kill');\nkill(1);\n```\n\nSend a signal other than SIGTERM.:\n```js\nvar kill = require('tree-kill');\nkill(1, 'SIGKILL');\n```\n\nRun a callback when done killing the processes. Passes an error argument if there was an error.\n```js\nvar kill = require('tree-kill');\nkill(1, 'SIGKILL', function(err) {\n    // Do things\n});\n```\n\nYou can also install tree-kill globally and use it as a command:\n```sh\ntree-kill 1          # sends SIGTERM to process 1 and its descendents\ntree-kill 1 SIGTERM  # same\ntree-kill 1 SIGKILL  # sends KILL instead of TERMINATE\n```\n\nMethods\n=======\n\n## require('tree-kill')(pid, [signal], [callback]);\n\nSends signal `signal` to all children processes of the process with pid `pid`, including `pid`. Signal defaults to `SIGTERM`.\n\nFor Linux, this uses `ps -o pid --no-headers --ppid PID` to find the parent pids of `PID`.\n\nFor Darwin/OSX, this uses `pgrep -P PID` to find the parent pids of `PID`.\n\nFor Windows, this uses `'taskkill /pid PID /T /F'` to kill the process tree. Note that on Windows, sending the different kinds of POSIX signals is not possible.\n\nInstall\n=======\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install tree-kill\n```\n\nLicense\n=======\n\nMIT\n\nChangelog\n=========\n\n\n## [1.2.2] - 2019-12-11\n### Changed\n- security fix: sanitize `pid` parameter to fix arbitrary code execution vulnerability\n\n## [1.2.1] - 2018-11-05\n### Changed\n- added missing LICENSE file\n- updated TypeScript definitions\n\n## [1.2.0] - 2017-09-19\n### Added\n- TypeScript definitions\n### Changed\n- `kill(pid, callback)` works. Before you had to use `kill(pid, signal, callback)`\n\n## [1.1.0] - 2016-05-13\n### Added\n- A `tree-kill` CLI\n\n## [1.0.0] - 2015-09-17\n### Added\n- optional callback\n- Darwin support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkrumins%2Fnode-tree-kill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkrumins%2Fnode-tree-kill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkrumins%2Fnode-tree-kill/lists"}