# stern-parent

> Use to launch a module in another process. The other process will be forcibly killed once the timer expires, even if the script is unresponsive or hijacking SIGTERM.

Latest version **1.0.0** (published 2015-09-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install stern-parent
pnpm add stern-parent
yarn add stern-parent
bun add stern-parent
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-09-16 |
| First published | 2015-09-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jeremy Greer |
| Maintainers | reergymerej |
| Keywords | child, process |

## Links

- npm: https://www.npmjs.com/package/stern-parent
- Repository: https://github.com/reergymerej/stern-parent
- Homepage: https://github.com/reergymerej/stern-parent#readme
- Issues: https://github.com/reergymerej/stern-parent/issues
- npm.io page: https://npm.io/package/stern-parent

## Recent versions

- 1.0.0 (latest) — 2015-09-16

## README

# stern-parent

Use to launch a module in another process.  The other process will be forcibly killed once the timer expires, even if the script is unresponsive or hijacking SIGTERM.

## Example

```js
var sternParent = require('stern-parent');
var path = require('path');
var modulePath = path.join(__dirname, './obedientChild.js');

// launch obedientChild in another process
// give it 2000 ms to live
// pass arguments, available through process.argv
sternParent.birth(modulePath, 2000, ['baz', 'quux']);
```

If needed, you can cancel or reset the countdown from within the child module.

```js
// obedientChild.js

// restart the countdown
process.send('countdown');

// restart at a different point
process.send({
  type: 'countdown',
  ms: 500
});

// cancel countdown altogether
process.send('cancel');
```


**TODO**
* set option to toggle logging

---
_Source: https://npm.io/package/stern-parent · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
