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
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-25 00:06:00 +0300
commite2c3e4727d5899a709f5c421e128a4af2ef626f3 (patch)
treeda562d9848f3b66dddd2f244972a5cbc672fda20 /doc/api/child_process.md
parentb6d293d2158c66a3edbb86c0c43b4c51af3484f7 (diff)
downloadandroid-node-v8-e2c3e4727d5899a709f5c421e128a4af2ef626f3.tar.gz
android-node-v8-e2c3e4727d5899a709f5c421e128a4af2ef626f3.tar.bz2
android-node-v8-e2c3e4727d5899a709f5c421e128a4af2ef626f3.zip
doc: conform to rules for eslint-plugin-markdown
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 d004147c77..80203c1b89 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -200,7 +200,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
@@ -933,13 +933,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