New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fkill

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fkill - npm Package Compare versions

Comparing version 8.0.1 to 8.1.0

17

index.js

@@ -110,2 +110,14 @@ import process from 'node:process';

const getCurrentProcessParentsPID = processes => {
const processMap = new Map(processes.map(ps => [ps.pid, ps.ppid]));
const pids = [];
let currentId = process.pid;
while (currentId) {
pids.push(currentId);
currentId = processMap.get(currentId);
}
return pids;
};
const killWithLimits = async (input, options) => {

@@ -118,6 +130,7 @@ input = await parseInput(input);

if (input === 'node') {
if (input === 'node' || input === 'node.exe') {
const processes = await psList();
const pids = getCurrentProcessParentsPID(processes);
await Promise.all(processes.map(async ps => {
if (ps.name === 'node' && ps.pid !== process.pid) {
if ((ps.name === 'node' || ps.name === 'node.exe') && !pids.includes(ps.pid)) {
await kill(ps.pid, options);

@@ -124,0 +137,0 @@ }

2

package.json
{
"name": "fkill",
"version": "8.0.1",
"version": "8.1.0",
"description": "Fabulously kill processes. Cross-platform.",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc