🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

noop-process

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

noop-process

Create a noop (no operation) process and get the PID

latest
Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
55
7.84%
Maintainers
1
Weekly downloads
 
Created
Source

noop-process

Create a noop (no operation) process and get the PID

Useful for testing purposes.

Install

$ npm install noop-process

Usage

import noopProcess from 'noop-process';

const pid = await noopProcess();

console.log(pid);
//=> 1337

API

noopProcess(options?)

Creates a noop process.

Returns a Promise<number> with the process ID of the created process.

options

Type: object

title

Type: string

Give the process a title to make it easier to see it in ps or kill it with killall.

Maximum 15 characters, as anything longer will be truncated by the system.

persistent

Type: boolean
Default: false

Let the process continue to live after the main process exits.

onlyForceKillable

Type: boolean
Default: false

Make the process only killable with SIGKILL.

cleanUpNoopProcesses()

All the processes are cleaned up when the main process exits, but you can use this if you need them cleaned up earlier.

import {cleanUpNoopProcesses} from 'noop-process';

cleanUpNoopProcesses();

Keywords

noop

FAQs

Package last updated on 10 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts