{
  "source": "doc/api/child_process.markdown",
  "modules": [
    {
      "textRaw": "Child Process",
      "name": "child_process",
      "stability": 2,
      "stabilityText": "Stable",
      "desc": "<p>Node.js provides a tri-directional <code>popen(3)</code> facility through the\n<code>child_process</code> module.\n\n</p>\n<p>It is possible to stream data through a child&#39;s <code>stdin</code>, <code>stdout</code>, and\n<code>stderr</code> in a fully non-blocking way.  (Note that some programs use\nline-buffered I/O internally.  That doesn&#39;t affect Node.js but it means\ndata you send to the child process may not be immediately consumed.)\n\n</p>\n<p>To create a child process, use <code>require(&#39;child_process&#39;).spawn()</code> or\n<code>require(&#39;child_process&#39;).fork()</code>.  The semantics of each are slightly\ndifferent as explained [below][].\n\n</p>\n<p>For scripting purposes you may find the [synchronous counterparts][] more\nconvenient.\n\n</p>\n",
      "classes": [
        {
          "textRaw": "Class: ChildProcess",
          "type": "class",
          "name": "ChildProcess",
          "desc": "<p><code>ChildProcess</code> is an [<code>EventEmitter</code>][].\n\n</p>\n<p>Child processes always have three streams associated with them. <code>child.stdin</code>,\n<code>child.stdout</code>, and <code>child.stderr</code>.  These may be shared with the stdio\nstreams of the parent process, or they may be separate stream objects\nwhich can be piped to and from.\n\n</p>\n<p>The <code>ChildProcess</code> class is not intended to be used directly.  Use the\n[<code>spawn()</code>][], [<code>exec()</code>][], [<code>execFile()</code>][], or [<code>fork()</code>][] methods to create\nan instance of <code>ChildProcess</code>.\n\n</p>\n",
          "events": [
            {
              "textRaw": "Event: 'close'",
              "type": "event",
              "name": "close",
              "params": [],
              "desc": "<p>This event is emitted when the stdio streams of a child process have all\nterminated.  This is distinct from <code>&#39;exit&#39;</code>, since multiple processes\nmight share the same stdio streams.\n\n</p>\n"
            },
            {
              "textRaw": "Event: 'disconnect'",
              "type": "event",
              "name": "disconnect",
              "desc": "<p>This event is emitted after calling the <code>.disconnect()</code> method in the parent\nor in the child. After disconnecting it is no longer possible to send messages,\nand the <code>.connected</code> property is false.\n\n</p>\n",
              "params": []
            },
            {
              "textRaw": "Event:  'error'",
              "type": "event",
              "name": "error",
              "params": [],
              "desc": "<p>Emitted when:\n\n</p>\n<ol>\n<li>The process could not be spawned, or</li>\n<li>The process could not be killed, or</li>\n<li>Sending a message to the child process failed.</li>\n</ol>\n<p>Note that the <code>&#39;exit&#39;</code> event may or may not fire after an error has occurred.\nIf you are listening on both events to fire a function, remember to guard\nagainst calling your function twice.\n\n</p>\n<p>See also [<code>ChildProcess#kill()</code>][] and [<code>ChildProcess#send()</code>][].\n\n</p>\n"
            },
            {
              "textRaw": "Event:  'exit'",
              "type": "event",
              "name": "exit",
              "params": [],
              "desc": "<p>This event is emitted after the child process ends. If the process terminated\nnormally, <code>code</code> is the final exit code of the process, otherwise <code>null</code>. If\nthe process terminated due to receipt of a signal, <code>signal</code> is the string name\nof the signal, otherwise <code>null</code>.\n\n</p>\n<p>Note that the child process stdio streams might still be open.\n\n</p>\n<p>Also, note that Node.js establishes signal handlers for <code>SIGINT</code> and\n<code>SIGTERM</code>. It will not terminate due to receipt of those signals. It will exit.\n\n</p>\n<p>See <code>waitpid(2)</code>.\n\n</p>\n"
            },
            {
              "textRaw": "Event: 'message'",
              "type": "event",
              "name": "message",
              "params": [],
              "desc": "<p>Messages sent by <code>.send(message, [sendHandle])</code> are obtained using the\n<code>&#39;message&#39;</code> event.\n\n</p>\n"
            }
          ],
          "properties": [
            {
              "textRaw": "`connected` {Boolean} Set to false after `.disconnect` is called ",
              "name": "connected",
              "desc": "<p>If <code>.connected</code> is false, it is no longer possible to send messages.\n\n</p>\n",
              "shortDesc": "Set to false after `.disconnect` is called"
            },
            {
              "textRaw": "`pid` {Integer} ",
              "name": "pid",
              "desc": "<p>The process identifier (PID) of the child process.\n\n</p>\n<p>Example:\n\n</p>\n<pre><code>const spawn = require(&#39;child_process&#39;).spawn;\nconst grep = spawn(&#39;grep&#39;, [&#39;ssh&#39;]);\n\nconsole.log(`Spawned child pid: ${grep.pid}`);\ngrep.stdin.end();</code></pre>\n"
            },
            {
              "textRaw": "`stderr` {Stream object} ",
              "name": "stderr",
              "desc": "<p>A <code>Readable Stream</code> that represents the child process&#39;s <code>stderr</code>.\n\n</p>\n<p>If the child was not spawned with <code>stdio[2]</code> set to <code>&#39;pipe&#39;</code>, then this will\nnot be set.\n\n</p>\n<p><code>child.stderr</code> is shorthand for <code>child.stdio[2]</code>. Both properties will refer\nto the same object, or null.\n\n</p>\n"
            },
            {
              "textRaw": "`stdin` {Stream object} ",
              "name": "stdin",
              "desc": "<p>A <code>Writable Stream</code> that represents the child process&#39;s <code>stdin</code>.\nIf the child is waiting to read all its input, it will not continue until this\nstream has been closed via <code>end()</code>.\n\n</p>\n<p>If the child was not spawned with <code>stdio[0]</code> set to <code>&#39;pipe&#39;</code>, then this will\nnot be set.\n\n</p>\n<p><code>child.stdin</code> is shorthand for <code>child.stdio[0]</code>. Both properties will refer\nto the same object, or null.\n\n</p>\n"
            },
            {
              "textRaw": "`stdio` {Array} ",
              "name": "stdio",
              "desc": "<p>A sparse array of pipes to the child process, corresponding with positions in\nthe [<code>stdio</code>][] option to [<code>spawn()</code>][] that have been set to <code>&#39;pipe&#39;</code>.\nNote that streams 0-2 are also available as ChildProcess.stdin,\nChildProcess.stdout, and ChildProcess.stderr, respectively.\n\n</p>\n<p>In the following example, only the child&#39;s fd <code>1</code> is setup as a pipe, so only\nthe parent&#39;s <code>child.stdio[1]</code> is a stream, all other values in the array are\n<code>null</code>.\n\n</p>\n<pre><code>const assert = require(&#39;assert&#39;);\nconst fs = require(&#39;fs&#39;);\nconst child_process = require(&#39;child_process&#39;);\n\nconst child = child_process.spawn(&#39;ls&#39;, {\n    stdio: [\n      0, // use parents stdin for child\n      &#39;pipe&#39;, // pipe child&#39;s stdout to parent\n      fs.openSync(&#39;err.out&#39;, &#39;w&#39;) // direct child&#39;s stderr to a file\n    ]\n});\n\nassert.equal(child.stdio[0], null);\nassert.equal(child.stdio[0], child.stdin);\n\nassert(child.stdout);\nassert.equal(child.stdio[1], child.stdout);\n\nassert.equal(child.stdio[2], null);\nassert.equal(child.stdio[2], child.stderr);</code></pre>\n"
            },
            {
              "textRaw": "`stdout` {Stream object} ",
              "name": "stdout",
              "desc": "<p>A <code>Readable Stream</code> that represents the child process&#39;s <code>stdout</code>.\n\n</p>\n<p>If the child was not spawned with <code>stdio[1]</code> set to <code>&#39;pipe&#39;</code>, then this will\nnot be set.\n\n</p>\n<p><code>child.stdout</code> is shorthand for <code>child.stdio[1]</code>. Both properties will refer\nto the same object, or null.\n\n</p>\n"
            }
          ],
          "methods": [
            {
              "textRaw": "child.disconnect()",
              "type": "method",
              "name": "disconnect",
              "desc": "<p>Close the IPC channel between parent and child, allowing the child to exit\ngracefully once there are no other connections keeping it alive. After calling\nthis method the <code>.connected</code> flag will be set to <code>false</code> in both the parent and\nchild, and it is no longer possible to send messages.\n\n</p>\n<p>The <code>&#39;disconnect&#39;</code> event will be emitted when there are no messages in the\nprocess of being received, most likely immediately.\n\n</p>\n<p>Note that you can also call <code>process.disconnect()</code> in the child process when the\nchild process has any open IPC channels with the parent (i.e [<code>fork()</code>][]).\n\n</p>\n",
              "signatures": [
                {
                  "params": []
                }
              ]
            },
            {
              "textRaw": "child.kill([signal])",
              "type": "method",
              "name": "kill",
              "signatures": [
                {
                  "params": [
                    {
                      "textRaw": "`signal` {String} ",
                      "name": "signal",
                      "type": "String",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "signal",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Send a signal to the child process. If no argument is given, the process will\nbe sent <code>&#39;SIGTERM&#39;</code>. See <code>signal(7)</code> for a list of available signals.\n\n</p>\n<pre><code>const spawn = require(&#39;child_process&#39;).spawn;\nconst grep = spawn(&#39;grep&#39;, [&#39;ssh&#39;]);\n\ngrep.on(&#39;close&#39;, (code, signal) =&gt; {\n  console.log(\n    `child process terminated due to receipt of signal ${signal}`);\n});\n\n// send SIGHUP to process\ngrep.kill(&#39;SIGHUP&#39;);</code></pre>\n<p>May emit an <code>&#39;error&#39;</code> event when the signal cannot be delivered. Sending a\nsignal to a child process that has already exited is not an error but may\nhave unforeseen consequences. Specifically, if the process identifier (PID) has\nbeen reassigned to another process, the signal will be delivered to that\nprocess instead. What happens next is anyone&#39;s guess.\n\n</p>\n<p>Note that while the function is called <code>kill</code>, the signal delivered to the\nchild process may not actually kill it.  <code>kill</code> really just sends a signal\nto a process.\n\n</p>\n<p>See <code>kill(2)</code>\n\n</p>\n"
            },
            {
              "textRaw": "child.send(message[, sendHandle][, callback])",
              "type": "method",
              "name": "send",
              "signatures": [
                {
                  "return": {
                    "textRaw": "Return: Boolean ",
                    "name": "return",
                    "desc": "Boolean"
                  },
                  "params": [
                    {
                      "textRaw": "`message` {Object} ",
                      "name": "message",
                      "type": "Object"
                    },
                    {
                      "textRaw": "`sendHandle` {Handle object} ",
                      "name": "sendHandle",
                      "type": "Handle object",
                      "optional": true
                    },
                    {
                      "textRaw": "`callback` {Function} ",
                      "name": "callback",
                      "type": "Function",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "message"
                    },
                    {
                      "name": "sendHandle",
                      "optional": true
                    },
                    {
                      "name": "callback",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>When using [<code>child_process.fork()</code>][] you can write to the child using\n<code>child.send(message[, sendHandle][, callback])</code> and messages are received by\na <code>&#39;message&#39;</code> event on the child.\n\n</p>\n<p>For example:\n\n</p>\n<pre><code>const cp = require(&#39;child_process&#39;);\nconst n = cp.fork(`${__dirname}/sub.js`);\n\nn.on(&#39;message&#39;, (m) =&gt; {\n  console.log(&#39;PARENT got message:&#39;, m);\n});\n\nn.send({ hello: &#39;world&#39; });</code></pre>\n<p>And then the child script, <code>&#39;sub.js&#39;</code> might look like this:\n\n</p>\n<pre><code>process.on(&#39;message&#39;, (m) =&gt; {\n  console.log(&#39;CHILD got message:&#39;, m);\n});\n\nprocess.send({ foo: &#39;bar&#39; });</code></pre>\n<p>In the child, the <code>process</code> object will have a <code>send()</code> method, and <code>process</code>\nwill emit objects each time it receives a message on its channel.\n\n</p>\n<p>There is a special case when sending a <code>{cmd: &#39;NODE_foo&#39;}</code> message. All messages\ncontaining a <code>NODE_</code> prefix in its <code>cmd</code> property will not be emitted in\nthe <code>&#39;message&#39;</code> event, since they are internal messages used by Node.js core.\nMessages containing the prefix are emitted in the <code>&#39;internalMessage&#39;</code> event.\nAvoid using this feature; it is subject to change without notice.\n\n</p>\n<p>The <code>sendHandle</code> option to <code>child.send()</code> is for sending a TCP server or\nsocket object to another process. The child will receive the object as its\nsecond argument to the <code>&#39;message&#39;</code> event.\n\n</p>\n<p>The <code>callback</code> option is a function that is invoked after the message is\nsent but before the target may have received it.  It is called with a single\nargument: <code>null</code> on success, or an [<code>Error</code>][] object on failure.\n\n</p>\n<p><code>child.send()</code> emits an <code>&#39;error&#39;</code> event if no callback was given and the message\ncannot be sent, for example because the child process has already exited.\n\n</p>\n<p>Returns <code>true</code> under normal circumstances or <code>false</code> when the backlog of\nunsent messages exceeds a threshold that makes it unwise to send more.\nUse the callback mechanism to implement flow control.\n\n</p>\n<h4>Example: sending server object</h4>\n<p>Here is an example of sending a server:\n\n</p>\n<pre><code>const child = require(&#39;child_process&#39;).fork(&#39;child.js&#39;);\n\n// Open up the server object and send the handle.\nconst server = require(&#39;net&#39;).createServer();\nserver.on(&#39;connection&#39;, (socket) =&gt; {\n  socket.end(&#39;handled by parent&#39;);\n});\nserver.listen(1337, () =&gt; {\n  child.send(&#39;server&#39;, server);\n});</code></pre>\n<p>And the child would then receive the server object as:\n\n</p>\n<pre><code>process.on(&#39;message&#39;, (m, server) =&gt; {\n  if (m === &#39;server&#39;) {\n    server.on(&#39;connection&#39;, (socket) =&gt; {\n      socket.end(&#39;handled by child&#39;);\n    });\n  }\n});</code></pre>\n<p>Note that the server is now shared between the parent and child, this means\nthat some connections will be handled by the parent and some by the child.\n\n</p>\n<p>For <code>dgram</code> servers the workflow is exactly the same.  Here you listen on\na <code>&#39;message&#39;</code> event instead of <code>&#39;connection&#39;</code> and use <code>server.bind</code> instead of\n<code>server.listen</code>.  (Currently only supported on UNIX platforms.)\n\n</p>\n<h4>Example: sending socket object</h4>\n<p>Here is an example of sending a socket. It will spawn two children and handle\nconnections with the remote address <code>74.125.127.100</code> as VIP by sending the\nsocket to a &quot;special&quot; child process. Other sockets will go to a &quot;normal&quot;\nprocess.\n\n</p>\n<pre><code>const normal = require(&#39;child_process&#39;).fork(&#39;child.js&#39;, [&#39;normal&#39;]);\nconst special = require(&#39;child_process&#39;).fork(&#39;child.js&#39;, [&#39;special&#39;]);\n\n// Open up the server and send sockets to child\nconst server = require(&#39;net&#39;).createServer();\nserver.on(&#39;connection&#39;, (socket) =&gt; {\n\n  // if this is a VIP\n  if (socket.remoteAddress === &#39;74.125.127.100&#39;) {\n    special.send(&#39;socket&#39;, socket);\n    return;\n  }\n  // just the usual...\n  normal.send(&#39;socket&#39;, socket);\n});\nserver.listen(1337);</code></pre>\n<p>The <code>child.js</code> could look like this:\n\n</p>\n<pre><code>process.on(&#39;message&#39;, (m, socket) =&gt; {\n  if (m === &#39;socket&#39;) {\n    socket.end(`You were handled as a ${process.argv[2]} person`);\n  }\n});</code></pre>\n<p>Note that once a single socket has been sent to a child the parent can no\nlonger keep track of when the socket is destroyed. To indicate this condition\nthe <code>.connections</code> property becomes <code>null</code>.\nIt is also recommended not to use <code>.maxConnections</code> in this condition.\n\n</p>\n"
            }
          ]
        }
      ],
      "modules": [
        {
          "textRaw": "Asynchronous Process Creation",
          "name": "asynchronous_process_creation",
          "desc": "<p>These methods follow the common async programming patterns (accepting a\ncallback or returning an EventEmitter).\n\n</p>\n",
          "methods": [
            {
              "textRaw": "child_process.exec(command[, options], callback)",
              "type": "method",
              "name": "exec",
              "signatures": [
                {
                  "return": {
                    "textRaw": "Return: ChildProcess object ",
                    "name": "return",
                    "desc": "ChildProcess object"
                  },
                  "params": [
                    {
                      "textRaw": "`command` {String} The command to run, with space-separated arguments ",
                      "name": "command",
                      "type": "String",
                      "desc": "The command to run, with space-separated arguments"
                    },
                    {
                      "textRaw": "`options` {Object} ",
                      "options": [
                        {
                          "textRaw": "`cwd` {String} Current working directory of the child process ",
                          "name": "cwd",
                          "type": "String",
                          "desc": "Current working directory of the child process"
                        },
                        {
                          "textRaw": "`env` {Object} Environment key-value pairs ",
                          "name": "env",
                          "type": "Object",
                          "desc": "Environment key-value pairs"
                        },
                        {
                          "textRaw": "`encoding` {String} (Default: 'utf8') ",
                          "name": "encoding",
                          "default": "utf8",
                          "type": "String"
                        },
                        {
                          "textRaw": "`shell` {String} Shell to execute the command with (Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows,  The shell should  understand the `-c` switch on UNIX or `/s /c` on Windows. On Windows,  command line parsing should be compatible with `cmd.exe`.) ",
                          "name": "shell",
                          "type": "String",
                          "desc": "Shell to execute the command with (Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows,  The shell should  understand the `-c` switch on UNIX or `/s /c` on Windows. On Windows,  command line parsing should be compatible with `cmd.exe`.)"
                        },
                        {
                          "textRaw": "`timeout` {Number} (Default: 0) ",
                          "name": "timeout",
                          "default": "0",
                          "type": "Number"
                        },
                        {
                          "textRaw": "`maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed (Default: `200*1024`) ",
                          "name": "maxBuffer",
                          "default": "200*1024",
                          "type": "Number",
                          "desc": "largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed"
                        },
                        {
                          "textRaw": "`killSignal` {String} (Default: 'SIGTERM') ",
                          "name": "killSignal",
                          "default": "SIGTERM",
                          "type": "String"
                        },
                        {
                          "textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ",
                          "name": "uid",
                          "type": "Number",
                          "desc": "Sets the user identity of the process. (See setuid(2).)"
                        },
                        {
                          "textRaw": "`gid` {Number} Sets the group identity of the process. (See setgid(2).) ",
                          "name": "gid",
                          "type": "Number",
                          "desc": "Sets the group identity of the process. (See setgid(2).)"
                        }
                      ],
                      "name": "options",
                      "type": "Object",
                      "optional": true
                    },
                    {
                      "textRaw": "`callback` {Function} called with the output when process terminates ",
                      "options": [
                        {
                          "textRaw": "`error` {Error} ",
                          "name": "error",
                          "type": "Error"
                        },
                        {
                          "textRaw": "`stdout` {Buffer} ",
                          "name": "stdout",
                          "type": "Buffer"
                        },
                        {
                          "textRaw": "`stderr` {Buffer} ",
                          "name": "stderr",
                          "type": "Buffer"
                        }
                      ],
                      "name": "callback",
                      "type": "Function",
                      "desc": "called with the output when process terminates"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "command"
                    },
                    {
                      "name": "options",
                      "optional": true
                    },
                    {
                      "name": "callback"
                    }
                  ]
                }
              ],
              "desc": "<p>Runs a command in a shell and buffers the output.\n\n</p>\n<pre><code>const exec = require(&#39;child_process&#39;).exec;\nconst child = exec(&#39;cat *.js bad_file | wc -l&#39;,\n  (error, stdout, stderr) =&gt; {\n    console.log(`stdout: ${stdout}`);\n    console.log(`stderr: ${stderr}`);\n    if (error !== null) {\n      console.log(`exec error: ${error}`);\n    }\n});</code></pre>\n<p>The callback gets the arguments <code>(error, stdout, stderr)</code>. On success, <code>error</code>\nwill be <code>null</code>.  On error, <code>error</code> will be an instance of [<code>Error</code>][] and <code>error.code</code>\nwill be the exit code of the child process, and <code>error.signal</code> will be set to the\nsignal that terminated the process.\n\n</p>\n<p>There is a second optional argument to specify several options. The\ndefault options are\n\n</p>\n<pre><code>{ encoding: &#39;utf8&#39;,\n  timeout: 0,\n  maxBuffer: 200*1024,\n  killSignal: &#39;SIGTERM&#39;,\n  cwd: null,\n  env: null }</code></pre>\n<p>If <code>timeout</code> is greater than 0, then it will kill the child process\nif it runs longer than <code>timeout</code> milliseconds. The child process is killed with\n<code>killSignal</code> (default: <code>&#39;SIGTERM&#39;</code>). <code>maxBuffer</code> specifies the largest\namount of data (in bytes) allowed on stdout or stderr - if this value is\nexceeded then the child process is killed.\n\n</p>\n<p><em>Note: Unlike the <code>exec()</code> POSIX system call, <code>child_process.exec()</code> does not replace\nthe existing process and uses a shell to execute the command.</em>\n\n</p>\n"
            },
            {
              "textRaw": "child_process.execFile(file[, args][, options][, callback])",
              "type": "method",
              "name": "execFile",
              "signatures": [
                {
                  "return": {
                    "textRaw": "Return: ChildProcess object ",
                    "name": "return",
                    "desc": "ChildProcess object"
                  },
                  "params": [
                    {
                      "textRaw": "`file` {String} The filename of the program to run ",
                      "name": "file",
                      "type": "String",
                      "desc": "The filename of the program to run"
                    },
                    {
                      "textRaw": "`args` {Array} List of string arguments ",
                      "name": "args",
                      "type": "Array",
                      "desc": "List of string arguments",
                      "optional": true
                    },
                    {
                      "textRaw": "`options` {Object} ",
                      "options": [
                        {
                          "textRaw": "`cwd` {String} Current working directory of the child process ",
                          "name": "cwd",
                          "type": "String",
                          "desc": "Current working directory of the child process"
                        },
                        {
                          "textRaw": "`env` {Object} Environment key-value pairs ",
                          "name": "env",
                          "type": "Object",
                          "desc": "Environment key-value pairs"
                        },
                        {
                          "textRaw": "`encoding` {String} (Default: 'utf8') ",
                          "name": "encoding",
                          "default": "utf8",
                          "type": "String"
                        },
                        {
                          "textRaw": "`timeout` {Number} (Default: 0) ",
                          "name": "timeout",
                          "default": "0",
                          "type": "Number"
                        },
                        {
                          "textRaw": "`maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed (Default: 200\\*1024) ",
                          "name": "maxBuffer",
                          "default": "200\\*1024",
                          "type": "Number",
                          "desc": "largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed"
                        },
                        {
                          "textRaw": "`killSignal` {String} (Default: 'SIGTERM') ",
                          "name": "killSignal",
                          "default": "SIGTERM",
                          "type": "String"
                        },
                        {
                          "textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ",
                          "name": "uid",
                          "type": "Number",
                          "desc": "Sets the user identity of the process. (See setuid(2).)"
                        },
                        {
                          "textRaw": "`gid` {Number} Sets the group identity of the process. (See setgid(2).) ",
                          "name": "gid",
                          "type": "Number",
                          "desc": "Sets the group identity of the process. (See setgid(2).)"
                        }
                      ],
                      "name": "options",
                      "type": "Object",
                      "optional": true
                    },
                    {
                      "textRaw": "`callback` {Function} called with the output when process terminates ",
                      "options": [
                        {
                          "textRaw": "`error` {Error} ",
                          "name": "error",
                          "type": "Error"
                        },
                        {
                          "textRaw": "`stdout` {Buffer} ",
                          "name": "stdout",
                          "type": "Buffer"
                        },
                        {
                          "textRaw": "`stderr` {Buffer} ",
                          "name": "stderr",
                          "type": "Buffer"
                        }
                      ],
                      "name": "callback",
                      "type": "Function",
                      "desc": "called with the output when process terminates",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "file"
                    },
                    {
                      "name": "args",
                      "optional": true
                    },
                    {
                      "name": "options",
                      "optional": true
                    },
                    {
                      "name": "callback",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>This is similar to [<code>child_process.exec()</code>][] except it does not execute a\nsubshell but rather the specified file directly. This makes it slightly\nleaner than [<code>child_process.exec()</code>][]. It has the same options.\n\n\n</p>\n"
            },
            {
              "textRaw": "child_process.fork(modulePath[, args][, options])",
              "type": "method",
              "name": "fork",
              "signatures": [
                {
                  "return": {
                    "textRaw": "Return: ChildProcess object ",
                    "name": "return",
                    "desc": "ChildProcess object"
                  },
                  "params": [
                    {
                      "textRaw": "`modulePath` {String} The module to run in the child ",
                      "name": "modulePath",
                      "type": "String",
                      "desc": "The module to run in the child"
                    },
                    {
                      "textRaw": "`args` {Array} List of string arguments ",
                      "name": "args",
                      "type": "Array",
                      "desc": "List of string arguments",
                      "optional": true
                    },
                    {
                      "textRaw": "`options` {Object} ",
                      "options": [
                        {
                          "textRaw": "`cwd` {String} Current working directory of the child process ",
                          "name": "cwd",
                          "type": "String",
                          "desc": "Current working directory of the child process"
                        },
                        {
                          "textRaw": "`env` {Object} Environment key-value pairs ",
                          "name": "env",
                          "type": "Object",
                          "desc": "Environment key-value pairs"
                        },
                        {
                          "textRaw": "`execPath` {String} Executable used to create the child process ",
                          "name": "execPath",
                          "type": "String",
                          "desc": "Executable used to create the child process"
                        },
                        {
                          "textRaw": "`execArgv` {Array} List of string arguments passed to the executable (Default: `process.execArgv`) ",
                          "name": "execArgv",
                          "default": "process.execArgv",
                          "type": "Array",
                          "desc": "List of string arguments passed to the executable"
                        },
                        {
                          "textRaw": "`silent` {Boolean} If true, stdin, stdout, and stderr of the child will be piped to the parent, otherwise they will be inherited from the parent, see the `'pipe'` and `'inherit'` options for [`spawn()`][]'s [`stdio`][] for more details (default is false) ",
                          "name": "silent",
                          "type": "Boolean",
                          "desc": "If true, stdin, stdout, and stderr of the child will be piped to the parent, otherwise they will be inherited from the parent, see the `'pipe'` and `'inherit'` options for [`spawn()`][]'s [`stdio`][] for more details (default is false)"
                        },
                        {
                          "textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ",
                          "name": "uid",
                          "type": "Number",
                          "desc": "Sets the user identity of the process. (See setuid(2).)"
                        },
                        {
                          "textRaw": "`gid` {Number} Sets the group identity of the process. (See setgid(2).) ",
                          "name": "gid",
                          "type": "Number",
                          "desc": "Sets the group identity of the process. (See setgid(2).)"
                        }
                      ],
                      "name": "options",
                      "type": "Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "modulePath"
                    },
                    {
                      "name": "args",
                      "optional": true
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>This is a special case of the [<code>child_process.spawn()</code>][] functionality for\nspawning Node.js processes. In addition to having all the methods in a normal\nChildProcess instance, the returned object has a communication channel built-in.\nSee [<code>ChildProcess#send()</code>][] for details.\n\n</p>\n<p>These child Node.js processes are still whole new instances of V8. Assume at\nleast 30ms startup and 10mb memory for each new Node.js. That is, you cannot\ncreate many thousands of them.\n\n</p>\n<p>The <code>execPath</code> property in the <code>options</code> object allows for a process to be\ncreated for the child rather than the current <code>node</code> executable. This should be\ndone with care and by default will talk over the fd represented an\nenvironmental variable <code>NODE_CHANNEL_FD</code> on the child process. The input and\noutput on this fd is expected to be line delimited JSON objects.\n\n</p>\n<p><em>Note: Unlike the <code>fork()</code> POSIX system call, [<code>child_process.fork()</code>][] does not clone the\ncurrent process.</em>\n\n</p>\n"
            },
            {
              "textRaw": "child_process.spawn(command[, args][, options])",
              "type": "method",
              "name": "spawn",
              "signatures": [
                {
                  "return": {
                    "textRaw": "return: {ChildProcess object} ",
                    "name": "return",
                    "type": "ChildProcess object"
                  },
                  "params": [
                    {
                      "textRaw": "`command` {String} The command to run ",
                      "name": "command",
                      "type": "String",
                      "desc": "The command to run"
                    },
                    {
                      "textRaw": "`args` {Array} List of string arguments ",
                      "name": "args",
                      "type": "Array",
                      "desc": "List of string arguments",
                      "optional": true
                    },
                    {
                      "textRaw": "`options` {Object} ",
                      "options": [
                        {
                          "textRaw": "`cwd` {String} Current working directory of the child process ",
                          "name": "cwd",
                          "type": "String",
                          "desc": "Current working directory of the child process"
                        },
                        {
                          "textRaw": "`env` {Object} Environment key-value pairs ",
                          "name": "env",
                          "type": "Object",
                          "desc": "Environment key-value pairs"
                        },
                        {
                          "textRaw": "`stdio` {Array|String} Child's stdio configuration. (See [below](#child_process_options_stdio)) ",
                          "name": "stdio",
                          "type": "Array|String",
                          "desc": "Child's stdio configuration. (See [below](#child_process_options_stdio))"
                        },
                        {
                          "textRaw": "`detached` {Boolean} Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [below](#child_process_options_detached)) ",
                          "name": "detached",
                          "type": "Boolean",
                          "desc": "Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [below](#child_process_options_detached))"
                        },
                        {
                          "textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ",
                          "name": "uid",
                          "type": "Number",
                          "desc": "Sets the user identity of the process. (See setuid(2).)"
                        },
                        {
                          "textRaw": "`gid` {Number} Sets the group identity of the process. (See setgid(2).) ",
                          "name": "gid",
                          "type": "Number",
                          "desc": "Sets the group identity of the process. (See setgid(2).)"
                        }
                      ],
                      "name": "options",
                      "type": "Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "command"
                    },
                    {
                      "name": "args",
                      "optional": true
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Launches a new process with the given <code>command</code>, with  command line arguments in\n<code>args</code>. If omitted, <code>args</code> defaults to an empty Array.\n\n</p>\n<p>The third argument is used to specify additional options, with these defaults:\n\n</p>\n<pre><code>{ cwd: undefined,\n  env: process.env\n}</code></pre>\n<p>Use <code>cwd</code> to specify the working directory from which the process is spawned.\nIf not given, the default is to inherit the current working directory.\n\n</p>\n<p>Use <code>env</code> to specify environment variables that will be visible to the new\nprocess, the default is <code>process.env</code>.\n\n</p>\n<p>Example of running <code>ls -lh /usr</code>, capturing <code>stdout</code>, <code>stderr</code>, and the exit code:\n\n</p>\n<pre><code>const spawn = require(&#39;child_process&#39;).spawn;\nconst ls = spawn(&#39;ls&#39;, [&#39;-lh&#39;, &#39;/usr&#39;]);\n\nls.stdout.on(&#39;data&#39;, (data) =&gt; {\n  console.log(`stdout: ${data}`);\n});\n\nls.stderr.on(&#39;data&#39;, (data) =&gt; {\n  console.log(`stderr: ${data}`);\n});\n\nls.on(&#39;close&#39;, (code) =&gt; {\n  console.log(`child process exited with code ${code}`);\n});</code></pre>\n<p>Example: A very elaborate way to run &#39;ps ax | grep ssh&#39;\n\n</p>\n<pre><code>const spawn = require(&#39;child_process&#39;).spawn;\nconst ps = spawn(&#39;ps&#39;, [&#39;ax&#39;]);\nconst grep = spawn(&#39;grep&#39;, [&#39;ssh&#39;]);\n\nps.stdout.on(&#39;data&#39;, (data) =&gt; {\n  grep.stdin.write(data);\n});\n\nps.stderr.on(&#39;data&#39;, (data) =&gt; {\n  console.log(`ps stderr: ${data}`);\n});\n\nps.on(&#39;close&#39;, (code) =&gt; {\n  if (code !== 0) {\n    console.log(`ps process exited with code ${code}`);\n  }\n  grep.stdin.end();\n});\n\ngrep.stdout.on(&#39;data&#39;, (data) =&gt; {\n  console.log(`${data}`);\n});\n\ngrep.stderr.on(&#39;data&#39;, (data) =&gt; {\n  console.log(`grep stderr: ${data}`);\n});\n\ngrep.on(&#39;close&#39;, (code) =&gt; {\n  if (code !== 0) {\n    console.log(`grep process exited with code ${code}`);\n  }\n});</code></pre>\n<p>Example of checking for failed exec:\n\n</p>\n<pre><code>const spawn = require(&#39;child_process&#39;).spawn;\nconst child = spawn(&#39;bad_command&#39;);\n\nchild.on(&#39;error&#39;, (err) =&gt; {\n  console.log(&#39;Failed to start child process.&#39;);\n});</code></pre>\n",
              "properties": [
                {
                  "textRaw": "options.detached",
                  "name": "detached",
                  "desc": "<p>On Windows, this makes it possible for the child to continue running after the\nparent exits. The child will have a new console window (this cannot be\ndisabled).\n\n</p>\n<p>On non-Windows, if the <code>detached</code> option is set, the child process will be made\nthe leader of a new process group and session. Note that child processes may\ncontinue running after the parent exits whether they are detached or not.  See\n<code>setsid(2)</code> for more information.\n\n</p>\n<p>By default, the parent will wait for the detached child to exit.  To prevent\nthe parent from waiting for a given <code>child</code>, use the <code>child.unref()</code> method,\nand the parent&#39;s event loop will not include the child in its reference count.\n\n</p>\n<p>Example of detaching a long-running process and redirecting its output to a\nfile:\n\n</p>\n<pre><code> const fs = require(&#39;fs&#39;);\n const spawn = require(&#39;child_process&#39;).spawn;\n const out = fs.openSync(&#39;./out.log&#39;, &#39;a&#39;);\n const err = fs.openSync(&#39;./out.log&#39;, &#39;a&#39;);\n\n const child = spawn(&#39;prg&#39;, [], {\n   detached: true,\n   stdio: [ &#39;ignore&#39;, out, err ]\n });\n\n child.unref();</code></pre>\n<p>When using the <code>detached</code> option to start a long-running process, the process\nwill not stay running in the background after the parent exits unless it is\nprovided with a <code>stdio</code> configuration that is not connected to the parent.\nIf the parent&#39;s <code>stdio</code> is inherited, the child will remain attached to the\ncontrolling terminal.\n\n</p>\n"
                },
                {
                  "textRaw": "options.stdio",
                  "name": "stdio",
                  "desc": "<p>As a shorthand, the <code>stdio</code> argument may be one of the following strings:\n\n</p>\n<ul>\n<li><code>&#39;pipe&#39;</code> - <code>[&#39;pipe&#39;, &#39;pipe&#39;, &#39;pipe&#39;]</code>, this is the default value</li>\n<li><code>&#39;ignore&#39;</code> - <code>[&#39;ignore&#39;, &#39;ignore&#39;, &#39;ignore&#39;]</code></li>\n<li><code>&#39;inherit&#39;</code> - <code>[process.stdin, process.stdout, process.stderr]</code> or <code>[0,1,2]</code></li>\n</ul>\n<p>Otherwise, the <code>&#39;stdio&#39;</code> option to [<code>child_process.spawn()</code>][] is an array where each\nindex corresponds to a fd in the child.  The value is one of the following:\n\n</p>\n<ol>\n<li><code>&#39;pipe&#39;</code> - Create a pipe between the child process and the parent process.\nThe parent end of the pipe is exposed to the parent as a property on the\n<code>child_process</code> object as <code>ChildProcess.stdio[fd]</code>. Pipes created for\nfds 0 - 2 are also available as ChildProcess.stdin, ChildProcess.stdout\nand ChildProcess.stderr, respectively.</li>\n<li><code>&#39;ipc&#39;</code> - Create an IPC channel for passing messages/file descriptors\nbetween parent and child. A ChildProcess may have at most <em>one</em> IPC stdio\nfile descriptor. Setting this option enables the ChildProcess.send() method.\nIf the child writes JSON messages to this file descriptor, then this will\ntrigger ChildProcess.on(&#39;message&#39;).  If the child is an Node.js program, then\nthe presence of an IPC channel will enable process.send() and\nprocess.on(&#39;message&#39;).</li>\n<li><code>&#39;ignore&#39;</code> - Do not set this file descriptor in the child. Note that Node.js\nwill always open fd 0 - 2 for the processes it spawns. When any of these is\nignored Node.js will open <code>/dev/null</code> and attach it to the child&#39;s fd.</li>\n<li><code>Stream</code> object - Share a readable or writable stream that refers to a tty,\nfile, socket, or a pipe with the child process. The stream&#39;s underlying\nfile descriptor is duplicated in the child process to the fd that\ncorresponds to the index in the <code>stdio</code> array. Note that the stream must\nhave an underlying descriptor (file streams do not until the <code>&#39;open&#39;</code>\nevent has occurred).</li>\n<li>Positive integer - The integer value is interpreted as a file descriptor\nthat is is currently open in the parent process. It is shared with the child\nprocess, similar to how <code>Stream</code> objects can be shared.</li>\n<li><code>null</code>, <code>undefined</code> - Use default value. For stdio fds 0, 1 and 2 (in other\nwords, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the\ndefault is <code>&#39;ignore&#39;</code>.</li>\n</ol>\n<p>Example:\n\n</p>\n<pre><code>const spawn = require(&#39;child_process&#39;).spawn;\n\n// Child will use parent&#39;s stdios\nspawn(&#39;prg&#39;, [], { stdio: &#39;inherit&#39; });\n\n// Spawn child sharing only stderr\nspawn(&#39;prg&#39;, [], { stdio: [&#39;pipe&#39;, &#39;pipe&#39;, process.stderr] });\n\n// Open an extra fd=4, to interact with programs present a\n// startd-style interface.\nspawn(&#39;prg&#39;, [], { stdio: [&#39;pipe&#39;, null, null, null, &#39;pipe&#39;] });</code></pre>\n<p>See also: [<code>child_process.exec()</code>][] and [<code>child_process.fork()</code>][]\n\n</p>\n"
                }
              ]
            }
          ],
          "type": "module",
          "displayName": "Asynchronous Process Creation"
        },
        {
          "textRaw": "Synchronous Process Creation",
          "name": "synchronous_process_creation",
          "desc": "<p>These methods are <strong>synchronous</strong>, meaning they <strong>WILL</strong> block the event loop,\npausing execution of your code until the spawned process exits.\n\n</p>\n<p>Blocking calls like these are mostly useful for simplifying general purpose\nscripting tasks and for simplifying the loading/processing of application\nconfiguration at startup.\n\n</p>\n",
          "methods": [
            {
              "textRaw": "child_process.execFileSync(file[, args][, options])",
              "type": "method",
              "name": "execFileSync",
              "signatures": [
                {
                  "return": {
                    "textRaw": "return: {Buffer|String} The stdout from the command ",
                    "name": "return",
                    "type": "Buffer|String",
                    "desc": "The stdout from the command"
                  },
                  "params": [
                    {
                      "textRaw": "`file` {String} The filename of the program to run ",
                      "name": "file",
                      "type": "String",
                      "desc": "The filename of the program to run"
                    },
                    {
                      "textRaw": "`args` {Array} List of string arguments ",
                      "name": "args",
                      "type": "Array",
                      "desc": "List of string arguments",
                      "optional": true
                    },
                    {
                      "textRaw": "`options` {Object} ",
                      "options": [
                        {
                          "textRaw": "`cwd` {String} Current working directory of the child process ",
                          "name": "cwd",
                          "type": "String",
                          "desc": "Current working directory of the child process"
                        },
                        {
                          "textRaw": "`input` {String|Buffer} The value which will be passed as stdin to the spawned process ",
                          "options": [
                            {
                              "textRaw": "supplying this value will override `stdio[0]` ",
                              "name": "supplying",
                              "desc": "this value will override `stdio[0]`"
                            }
                          ],
                          "name": "input",
                          "type": "String|Buffer",
                          "desc": "The value which will be passed as stdin to the spawned process"
                        },
                        {
                          "textRaw": "`stdio` {Array} Child's stdio configuration. (Default: 'pipe') ",
                          "options": [
                            {
                              "textRaw": "`stderr` by default will be output to the parent process' stderr unless `stdio` is specified ",
                              "name": "stderr",
                              "desc": "by default will be output to the parent process' stderr unless `stdio` is specified"
                            }
                          ],
                          "name": "stdio",
                          "default": "pipe",
                          "type": "Array",
                          "desc": "Child's stdio configuration."
                        },
                        {
                          "textRaw": "`env` {Object} Environment key-value pairs ",
                          "name": "env",
                          "type": "Object",
                          "desc": "Environment key-value pairs"
                        },
                        {
                          "textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ",
                          "name": "uid",
                          "type": "Number",
                          "desc": "Sets the user identity of the process. (See setuid(2).)"
                        },
                        {
                          "textRaw": "`gid` {Number} Sets the group identity of the process. (See setgid(2).) ",
                          "name": "gid",
                          "type": "Number",
                          "desc": "Sets the group identity of the process. (See setgid(2).)"
                        },
                        {
                          "textRaw": "`timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined) ",
                          "name": "timeout",
                          "default": "undefined",
                          "type": "Number",
                          "desc": "In milliseconds the maximum amount of time the process is allowed to run."
                        },
                        {
                          "textRaw": "`killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM') ",
                          "name": "killSignal",
                          "default": "SIGTERM",
                          "type": "String",
                          "desc": "The signal value to be used when the spawned process will be killed."
                        },
                        {
                          "textRaw": "`maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed ",
                          "name": "maxBuffer",
                          "type": "Number",
                          "desc": "largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed"
                        },
                        {
                          "textRaw": "`encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer') ",
                          "name": "encoding",
                          "default": "buffer",
                          "type": "String",
                          "desc": "The encoding used for all stdio inputs and outputs."
                        }
                      ],
                      "name": "options",
                      "type": "Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "file"
                    },
                    {
                      "name": "args",
                      "optional": true
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p><code>execFileSync</code> will not return until the child process has fully closed. When a\ntimeout has been encountered and <code>killSignal</code> is sent, the method won&#39;t return\nuntil the process has completely exited. That is to say, if the process handles\nthe <code>SIGTERM</code> signal and doesn&#39;t exit, your process will wait until the child\nprocess has exited.\n\n</p>\n<p>If the process times out, or has a non-zero exit code, this method <strong><em>will</em></strong>\nthrow.  The [<code>Error</code>][] object will contain the entire result from\n[<code>child_process.spawnSync()</code>][]\n\n</p>\n"
            },
            {
              "textRaw": "child_process.execSync(command[, options])",
              "type": "method",
              "name": "execSync",
              "signatures": [
                {
                  "return": {
                    "textRaw": "return: {Buffer|String} The stdout from the command ",
                    "name": "return",
                    "type": "Buffer|String",
                    "desc": "The stdout from the command"
                  },
                  "params": [
                    {
                      "textRaw": "`command` {String} The command to run ",
                      "name": "command",
                      "type": "String",
                      "desc": "The command to run"
                    },
                    {
                      "textRaw": "`options` {Object} ",
                      "options": [
                        {
                          "textRaw": "`cwd` {String} Current working directory of the child process ",
                          "name": "cwd",
                          "type": "String",
                          "desc": "Current working directory of the child process"
                        },
                        {
                          "textRaw": "`input` {String|Buffer} The value which will be passed as stdin to the spawned process ",
                          "options": [
                            {
                              "textRaw": "supplying this value will override `stdio[0]` ",
                              "name": "supplying",
                              "desc": "this value will override `stdio[0]`"
                            }
                          ],
                          "name": "input",
                          "type": "String|Buffer",
                          "desc": "The value which will be passed as stdin to the spawned process"
                        },
                        {
                          "textRaw": "`stdio` {Array} Child's stdio configuration. (Default: 'pipe') ",
                          "options": [
                            {
                              "textRaw": "`stderr` by default will be output to the parent process' stderr unless `stdio` is specified ",
                              "name": "stderr",
                              "desc": "by default will be output to the parent process' stderr unless `stdio` is specified"
                            }
                          ],
                          "name": "stdio",
                          "default": "pipe",
                          "type": "Array",
                          "desc": "Child's stdio configuration."
                        },
                        {
                          "textRaw": "`env` {Object} Environment key-value pairs ",
                          "name": "env",
                          "type": "Object",
                          "desc": "Environment key-value pairs"
                        },
                        {
                          "textRaw": "`shell` {String} Shell to execute the command with (Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows,  The shell should  understand the `-c` switch on UNIX or `/s /c` on Windows. On Windows,  command line parsing should be compatible with `cmd.exe`.) ",
                          "name": "shell",
                          "type": "String",
                          "desc": "Shell to execute the command with (Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows,  The shell should  understand the `-c` switch on UNIX or `/s /c` on Windows. On Windows,  command line parsing should be compatible with `cmd.exe`.)"
                        },
                        {
                          "textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ",
                          "name": "uid",
                          "type": "Number",
                          "desc": "Sets the user identity of the process. (See setuid(2).)"
                        },
                        {
                          "textRaw": "`gid` {Number} Sets the group identity of the process. (See setgid(2).) ",
                          "name": "gid",
                          "type": "Number",
                          "desc": "Sets the group identity of the process. (See setgid(2).)"
                        },
                        {
                          "textRaw": "`timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined) ",
                          "name": "timeout",
                          "default": "undefined",
                          "type": "Number",
                          "desc": "In milliseconds the maximum amount of time the process is allowed to run."
                        },
                        {
                          "textRaw": "`killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM') ",
                          "name": "killSignal",
                          "default": "SIGTERM",
                          "type": "String",
                          "desc": "The signal value to be used when the spawned process will be killed."
                        },
                        {
                          "textRaw": "`maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed ",
                          "name": "maxBuffer",
                          "type": "Number",
                          "desc": "largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed"
                        },
                        {
                          "textRaw": "`encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer') ",
                          "name": "encoding",
                          "default": "buffer",
                          "type": "String",
                          "desc": "The encoding used for all stdio inputs and outputs."
                        }
                      ],
                      "name": "options",
                      "type": "Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "command"
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p><code>execSync</code> will not return until the child process has fully closed. When a\ntimeout has been encountered and <code>killSignal</code> is sent, the method won&#39;t return\nuntil the process has completely exited. That is to say, if the process handles\nthe <code>SIGTERM</code> signal and doesn&#39;t exit, your process will wait until the child\nprocess has exited.\n\n</p>\n<p>If the process times out, or has a non-zero exit code, this method <strong><em>will</em></strong>\nthrow.  The [<code>Error</code>][] object will contain the entire result from\n[<code>child_process.spawnSync()</code>][]\n\n</p>\n"
            },
            {
              "textRaw": "child_process.spawnSync(command[, args][, options])",
              "type": "method",
              "name": "spawnSync",
              "signatures": [
                {
                  "return": {
                    "textRaw": "return: {Object} ",
                    "options": [
                      {
                        "textRaw": "`pid` {Number} Pid of the child process ",
                        "name": "pid",
                        "type": "Number",
                        "desc": "Pid of the child process"
                      },
                      {
                        "textRaw": "`output` {Array} Array of results from stdio output ",
                        "name": "output",
                        "type": "Array",
                        "desc": "Array of results from stdio output"
                      },
                      {
                        "textRaw": "`stdout` {Buffer|String} The contents of `output[1]` ",
                        "name": "stdout",
                        "type": "Buffer|String",
                        "desc": "The contents of `output[1]`"
                      },
                      {
                        "textRaw": "`stderr` {Buffer|String} The contents of `output[2]` ",
                        "name": "stderr",
                        "type": "Buffer|String",
                        "desc": "The contents of `output[2]`"
                      },
                      {
                        "textRaw": "`status` {Number} The exit code of the child process ",
                        "name": "status",
                        "type": "Number",
                        "desc": "The exit code of the child process"
                      },
                      {
                        "textRaw": "`signal` {String} The signal used to kill the child process ",
                        "name": "signal",
                        "type": "String",
                        "desc": "The signal used to kill the child process"
                      },
                      {
                        "textRaw": "`error` {Error} The error object if the child process failed or timed out ",
                        "name": "error",
                        "type": "Error",
                        "desc": "The error object if the child process failed or timed out"
                      }
                    ],
                    "name": "return",
                    "type": "Object"
                  },
                  "params": [
                    {
                      "textRaw": "`command` {String} The command to run ",
                      "name": "command",
                      "type": "String",
                      "desc": "The command to run"
                    },
                    {
                      "textRaw": "`args` {Array} List of string arguments ",
                      "name": "args",
                      "type": "Array",
                      "desc": "List of string arguments",
                      "optional": true
                    },
                    {
                      "textRaw": "`options` {Object} ",
                      "options": [
                        {
                          "textRaw": "`cwd` {String} Current working directory of the child process ",
                          "name": "cwd",
                          "type": "String",
                          "desc": "Current working directory of the child process"
                        },
                        {
                          "textRaw": "`input` {String|Buffer} The value which will be passed as stdin to the spawned process ",
                          "options": [
                            {
                              "textRaw": "supplying this value will override `stdio[0]` ",
                              "name": "supplying",
                              "desc": "this value will override `stdio[0]`"
                            }
                          ],
                          "name": "input",
                          "type": "String|Buffer",
                          "desc": "The value which will be passed as stdin to the spawned process"
                        },
                        {
                          "textRaw": "`stdio` {Array} Child's stdio configuration. ",
                          "name": "stdio",
                          "type": "Array",
                          "desc": "Child's stdio configuration."
                        },
                        {
                          "textRaw": "`env` {Object} Environment key-value pairs ",
                          "name": "env",
                          "type": "Object",
                          "desc": "Environment key-value pairs"
                        },
                        {
                          "textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ",
                          "name": "uid",
                          "type": "Number",
                          "desc": "Sets the user identity of the process. (See setuid(2).)"
                        },
                        {
                          "textRaw": "`gid` {Number} Sets the group identity of the process. (See setgid(2).) ",
                          "name": "gid",
                          "type": "Number",
                          "desc": "Sets the group identity of the process. (See setgid(2).)"
                        },
                        {
                          "textRaw": "`timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined) ",
                          "name": "timeout",
                          "default": "undefined",
                          "type": "Number",
                          "desc": "In milliseconds the maximum amount of time the process is allowed to run."
                        },
                        {
                          "textRaw": "`killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM') ",
                          "name": "killSignal",
                          "default": "SIGTERM",
                          "type": "String",
                          "desc": "The signal value to be used when the spawned process will be killed."
                        },
                        {
                          "textRaw": "`maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed ",
                          "name": "maxBuffer",
                          "type": "Number",
                          "desc": "largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed"
                        },
                        {
                          "textRaw": "`encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer') ",
                          "name": "encoding",
                          "default": "buffer",
                          "type": "String",
                          "desc": "The encoding used for all stdio inputs and outputs."
                        }
                      ],
                      "name": "options",
                      "type": "Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "command"
                    },
                    {
                      "name": "args",
                      "optional": true
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p><code>spawnSync</code> will not return until the child process has fully closed. When a\ntimeout has been encountered and <code>killSignal</code> is sent, the method won&#39;t return\nuntil the process has completely exited. That is to say, if the process handles\nthe <code>SIGTERM</code> signal and doesn&#39;t exit, your process will wait until the child\nprocess has exited.\n\n</p>\n"
            }
          ],
          "type": "module",
          "displayName": "Synchronous Process Creation"
        }
      ],
      "type": "module",
      "displayName": "Child Process"
    }
  ]
}
