# pid-descendant

> get pid descendant

Latest version **1.0.4** (published 2022-05-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install pid-descendant
pnpm add pid-descendant
yarn add pid-descendant
bun add pid-descendant
```

## 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.4 |
| Published | 2022-05-26 |
| First published | 2021-12-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | fwg |
| Maintainers | adf0001 |
| Keywords | pid, descendant |

## Links

- npm: https://www.npmjs.com/package/pid-descendant
- Repository: https://github.com/adf0001/pid-descendant
- Homepage: https://github.com/adf0001/pid-descendant#readme
- Issues: https://github.com/adf0001/pid-descendant/issues
- npm.io page: https://npm.io/package/pid-descendant

## Dependencies (1)

- [text-line-array](https://npm.io/package/text-line-array.md) ^1.0.3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-05-26
- 1.0.3 — 2021-12-21
- 1.0.2 — 2021-12-20
- 1.0.1 — 2021-12-20
- 1.0.0 — 2021-12-18

## README

# pid-descendant
get pid descendant

# Install
```
npm install pid-descendant
```

# Usage & Api
```javascript

var pid_descendant = require("pid-descendant");

var proc = child_process.exec("ping -n 8 www.163.com", { shell: true });

setTimeout(
	function () {
		//getPidDescendant = function (pid, cb)		//set pid=null to get system pid
		pid_descendant(proc.pid,
			function (err, data) {
				if (err) { console.log(err); return; }

				//define result-item as [ppid, pid, name, stat]
				//data is an array of result-item
				console.log(data);
				/*
				output text like this
					[ [ '3764', '6744', 'cmd.exe' ],
					[ '6744', '8444', 'PING.EXE' ] ]
				*/

				//a simple kill tool
				pid_descendant.kill(proc.pid);

				done(!(
					data.length == 2
				));
			});
	},
	1000
);


```

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