summaryrefslogtreecommitdiff
path: root/doc/api/child_process.md
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-21 17:38:31 +0300
committerMyles Borins <mylesborins@google.com>2017-07-30 23:11:10 -0500
commit8c0849d5db197bce74eacb5e588a00222c641dba (patch)
treeee00cdba9edf34ddde1d6384f39d8af3f3ace206 /doc/api/child_process.md
parent7deb259ccbe1b2588b69029deec8728f2d422ecc (diff)
downloadnode-new-8c0849d5db197bce74eacb5e588a00222c641dba.tar.gz
doc: conform to rules for eslint-plugin-markdown
Backport-PR-URL: https://github.com/nodejs/node/pull/14067 PR-URL: https://github.com/nodejs/node/pull/12563 Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Diffstat (limited to 'doc/api/child_process.md')
-rw-r--r--doc/api/child_process.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index 3ea65c6fcb..11c40f425f 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -188,7 +188,7 @@ the process is spawned. The default options are:
const defaults = {
encoding: 'utf8',
timeout: 0,
- maxBuffer: 200*1024,
+ maxBuffer: 200 * 1024,
killSignal: 'SIGTERM',
cwd: null,
env: null
@@ -868,13 +868,17 @@ as in this example:
'use strict';
const spawn = require('child_process').spawn;
-const child = spawn('sh', ['-c',
- `node -e "setInterval(() => {
+const child = spawn(
+ 'sh',
+ [
+ '-c',
+ `node -e "setInterval(() => {
console.log(process.pid, 'is alive')
}, 500);"`
], {
stdio: ['inherit', 'inherit', 'inherit']
- });
+ }
+);
setTimeout(() => {
child.kill(); // does not terminate the node process in the shell