{"id":15374659,"url":"https://github.com/nktnet1/kill-sync","last_synced_at":"2025-04-15T12:31:28.037Z","repository":{"id":203734709,"uuid":"710310659","full_name":"nktnet1/kill-sync","owner":"nktnet1","description":"Synchronously kill processes based on their pid. Supports treekill, where child processes are recursively terminated.","archived":false,"fork":false,"pushed_at":"2025-03-28T03:01:19.000Z","size":753,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T05:36:20.526Z","etag":null,"topics":["kill","kill-sync","nodejs","pid","process","processes","signal","sync","synchronous","taskkill","termintae","tree","tree-kill","tree-kill-sync","trees"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/kill-sync","language":"TypeScript","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/nktnet1.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}},"created_at":"2023-10-26T12:50:52.000Z","updated_at":"2025-03-28T03:01:22.000Z","dependencies_parsed_at":"2024-10-08T15:36:29.123Z","dependency_job_id":"efbfc603-afb6-4fb2-b1b9-dfb916b1fb2e","html_url":"https://github.com/nktnet1/kill-sync","commit_stats":{"total_commits":115,"total_committers":3,"mean_commits":"38.333333333333336","dds":"0.16521739130434787","last_synced_commit":"047645ae1a023ea145383de8f192254b0b61b5bc"},"previous_names":["nktnet1/kill-sync"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nktnet1%2Fkill-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nktnet1%2Fkill-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nktnet1%2Fkill-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nktnet1%2Fkill-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nktnet1","download_url":"https://codeload.github.com/nktnet1/kill-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072204,"owners_count":21208137,"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":["kill","kill-sync","nodejs","pid","process","processes","signal","sync","synchronous","taskkill","termintae","tree","tree-kill","tree-kill-sync","trees"],"created_at":"2024-10-01T13:59:25.717Z","updated_at":"2025-04-15T12:31:27.714Z","avatar_url":"https://github.com/nktnet1.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# [![Kill Sync](logo.svg)](https://github.com/nktnet1/kill-sync)\n\n[![pipeline](https://github.com/nktnet1/kill-sync/actions/workflows/pipeline.yml/badge.svg)](https://github.com/nktnet1/kill-sync/actions/workflows/pipeline.yml)\n\u0026nbsp;\n[![codecov](https://codecov.io/gh/nktnet1/kill-sync/graph/badge.svg?token=1GEKQVOV2N)](https://codecov.io/gh/nktnet1/kill-sync)\n\u0026nbsp;\n[![Maintainability](https://api.codeclimate.com/v1/badges/22754e8b9e4115bfea34/maintainability)](https://codeclimate.com/github/nktnet1/kill-sync/maintainability)\n\u0026nbsp;\n[![Snyk Security](https://snyk.io/test/github/nktnet1/kill-sync/badge.svg)](https://snyk.io/test/github/nktnet1/kill-sync)\n\u0026nbsp;\n[![GitHub top language](https://img.shields.io/github/languages/top/nktnet1/kill-sync)](https://github.com/search?q=repo%3Anktnet1%2Fkill-sync++language%3ATypeScript\u0026type=code)\n\n[![NPM Version](https://img.shields.io/npm/v/kill-sync?logo=npm)](https://www.npmjs.com/package/kill-sync?activeTab=versions)\n\u0026nbsp;\n[![install size](https://packagephobia.com/badge?p=kill-sync)](https://packagephobia.com/result?p=kill-sync)\n\u0026nbsp;\n[![Depfu](https://badges.depfu.com/badges/eb25f8d58645072d8c825936b35eefdf/overview.svg)](https://depfu.com/github/nktnet1/kill-sync?project_id=39387)\n\u0026nbsp;\n[![NPM License](https://img.shields.io/npm/l/kill-sync)](https://opensource.org/license/mit/)\n\u0026nbsp;\n[![GitHub issues](https://img.shields.io/github/issues/nktnet1/kill-sync.svg?style=social)](https://github.com/nktnet1/kill-sync/issues)\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nktnet1_kill-sync\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=nktnet1_kill-sync)\n\u0026nbsp;\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a0603f8002a64358bb27d108a34ea9fd)](https://app.codacy.com/gh/nktnet1/kill-sync/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n\u0026nbsp;\n[![DeepSource](https://app.deepsource.com/gh/nktnet1/kill-sync.svg/?label=active+issues\u0026show_trend=true\u0026token=ZT1DUc2410SDoicC-C4SCDrq)](https://app.deepsource.com/gh/nktnet1/kill-sync/)\n\u0026nbsp;\n[![codebeat badge](https://codebeat.co/badges/bfa3396a-d5c5-424f-b689-b8e89996d996)](https://codebeat.co/projects/github-com-nktnet1-kill-sync-main)\n\u0026nbsp;\n[![GitHub stars](https://img.shields.io/github/stars/nktnet1/kill-sync.svg?style=social)](https://github.com/nktnet1/kill-sync/stargazers)\n\n[![Downloads Total](https://badgen.net/npm/dt/kill-sync)](https://moiva.io/?npm=kill-sync)\n\u0026nbsp;\n[![Downloads Yearly](https://badgen.net/npm/dy/kill-sync)](https://moiva.io/?npm=kill-sync)\n\u0026nbsp;\n[![Downloads Monthly](https://badgen.net/npm/dm/kill-sync)](https://moiva.io/?npm=kill-sync)\n\u0026nbsp;\n[![Downloads Weekly](https://badgen.net/npm/dw/kill-sync)](https://moiva.io/?npm=kill-sync)\n\u0026nbsp;\n[![Downloads Daily](https://badgen.net/npm/dd/kill-sync)](https://moiva.io/?npm=kill-sync)\n\n---\n\n\nSynchronously kill processes based on their pid\n\nSupports treekill, where child processes are recursively terminated\n\n\u003c/div\u003e\n\n---\n\n- [1. Installation](#1-installation)\n- [2. Usage](#2-usage)\n- [3. License](#3-license)\n- [4. Limitations](#4-limitations)\n- [5. Caveats](#5-caveats)\n\n## 1. Installation\n\n```\nnpm install kill-sync\n```\n\n## 2. Usage\n\nTry with [Replit](https://replit.com/@nktnet1/kill-sync-example#index.js).\n\n```javascript\nkillSync(pid)\nkillSync(pid, signal)\nkillSync(pid, signal, recursive)\n```\n- **`pid`**: a number denoting the [process identifier](https://en.wikipedia.org/wiki/Process_identifier)\n- **`signal`**: [inter-process communication signals](https://en.wikipedia.org/wiki/Signal_(IPC)). Default: `'SIGTERM'` (`15`)\n- **`recursive`**: boolean to enable tree-killing child processes. Default: `false`\n\nExample 1: kill a process with `SIGTERM`\n```javascript\nconst killSync = require('kill-sync');\nkillSync(31842840);\n```\n\nExample 2: kill a process with `SIGINT`\n```javascript\nconst killSync = require('kill-sync');\nkillSync(5313514, 'SIGINT');\n```\n\nExample 3: kill a process with `SIGINT` recursively\n```javascript\nconst killSync = require('kill-sync');\nkillSync(315230, 'SIGINT', true);\n```\n\n\n## 3. License\n\n\u003cdetails closed\u003e\n\u003csummary\u003e\n  Massachusetts Institute of Technology\n  (\u003ca href=\"https://opensource.org/license/mit\" target=\"_blank\"\u003eMIT\u003c/a\u003e)\n\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n```\nCopyright (c) 2023 Khiet Tam Nguyen\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the “Software”),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n```\n\n\u003c/details\u003e\n\n## 4. Limitations\n\nThere are currently no known limitations.\n\n## 5. Caveats\n\n**kill-sync** is modelled after [tree-kill](https://github.com/pkrumins/node-tree-kill) and [tree-kill-sync](https://github.com/dvpnt/tree-kill-sync).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnktnet1%2Fkill-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnktnet1%2Fkill-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnktnet1%2Fkill-sync/lists"}