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

subcomandante

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

subcomandante

run a command but wait on the parent

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

node-subcomandante

Morir fue lo unico que el subcomandante hizo sin su comandante.

This module is a companion to comandante. It is meant to solve the problem of child processes which must die along with their parents in node, which often leaves children hanging.

Usage

subcomandante works just like comandante:

// comandante
var run = require('comandante')
run(['tail', '-f', '/dev/null']) // will wait forever.
process.exit(0)

// subcomandante
var run = require('subcomandante')
run(['tail', '-f', '/dev/null']) // will exit with parent.
process.exit(0)
opts.waitPid

Pass in a pid with opts.waitPid to wait on that process, instead of the current process (process.pid).

run(['nc', '-l', '1234'], {waitPid: 1919})

subcom binary

> subcom
usage: subcom <pid> <cmd>...
run <cmd> until <pid> exits.

The subcom binary is very simple-- it runs a child process until process with given <pid> exits. It forwards all io, and exits with the same error code as the child. It will also employ brute strength (kill -9) if the child refuses to exit gracefully.

Keywords

FAQs

Package last updated on 01 May 2018

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

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