/deno_process

process module for Deno

Primary LanguageTypeScriptMIT LicenseMIT


Badge License    Badge Status



Deno Process

A deno module for process management.



Features

  Cross Platform Support       Get  

  GetTree       GetAll       Kill  



Usage

All methods require the  --allow-run  flags.

import * as Process from 'https://deno.land/x/process@v0.3.0/mod.ts'

Get

Get a process info with it's id.

const processId = 1;
const info = await Process.get(processId);

Get All

Return all processes.

const processes = await Process.getAll();

Get Tree

Return the process tree.

const tree = await Process.getTree();

Kill

Kill a process by Id or name.

const processName = 'deno';
await Process.kill(processName);
const processId = 1024;
await Process.kill(processId);