~ubuntu-branches/ubuntu/trusty/nodejs/trusty

« back to all changes in this revision

Viewing changes to doc/api/process.html

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-10-19 01:26:18 UTC
  • mfrom: (7.1.46 sid)
  • Revision ID: package-import@ubuntu.com-20131019012618-h1dhygiequfjj1hh
Tags: 0.10.21~dfsg1-1
* Upstream update.
* Update 2005 patch, allow test-http-pipeline-flood to fail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html lang="en">
3
3
<head>
4
4
  <meta charset="utf-8">
5
 
  <title>process Node.js v0.10.15 Manual &amp; Documentation</title>
 
5
  <title>process Node.js v0.10.21 Manual &amp; Documentation</title>
6
6
  <link rel="stylesheet" href="assets/style.css">
7
7
  <link rel="stylesheet" href="assets/sh.css">
8
8
  <link rel="canonical" href="http://nodejs.org/api/process.html">
31
31
 
32
32
        <div id="column1" class="interior">
33
33
          <header>
34
 
            <h1>Node.js v0.10.15 Manual &amp; Documentation</h1>
 
34
            <h1>Node.js v0.10.21 Manual &amp; Documentation</h1>
35
35
            <div id="gtoc">
36
36
              <p>
37
37
                <a href="index.html" name="toc">Index</a> |
54
54
<li><a href="#process_process_stdin">process.stdin</a></li>
55
55
<li><a href="#process_process_argv">process.argv</a></li>
56
56
<li><a href="#process_process_execpath">process.execPath</a></li>
 
57
<li><a href="#process_process_execargv">process.execArgv</a></li>
57
58
<li><a href="#process_process_abort">process.abort()</a></li>
58
59
<li><a href="#process_process_chdir_directory">process.chdir(directory)</a></li>
59
60
<li><a href="#process_process_cwd">process.cwd()</a></li>
153
154
</p>
154
155
<h2>Signal Events<span><a class="mark" href="#process_signal_events" id="process_signal_events">#</a></span></h2>
155
156
<!--type=event-->
156
 
<!--name=SIGINT, SIGUSR1, etc.-->
 
157
<!--name=SIGINT, SIGHUP, etc.-->
157
158
 
158
159
<p>Emitted when the processes receives a signal. See sigaction(2) for a list of
159
 
standard POSIX signal names such as SIGINT, SIGUSR1, etc.
 
160
standard POSIX signal names such as SIGINT, SIGHUP, etc.
160
161
 
161
162
</p>
162
163
<p>Example of listening for <code>SIGINT</code>:
171
172
<p>An easy way to send the <code>SIGINT</code> signal is with <code>Control-C</code> in most terminal
172
173
programs.
173
174
 
 
175
</p>
 
176
<p>Note: SIGUSR1 is reserved by node.js to kickstart the debugger.  It&#39;s possible
 
177
to install a listener but that won&#39;t stop the debugger from starting.
174
178
 
175
179
</p>
176
180
<h2>process.stdout<span><a class="mark" href="#process_process_stdout" id="process_process_stdout">#</a></span></h2>
261
265
 
262
266
</p>
263
267
<pre><code>/usr/local/bin/node</code></pre>
 
268
<h2>process.execArgv<span><a class="mark" href="#process_process_execargv" id="process_process_execargv">#</a></span></h2>
 
269
<p>This is the set of node-specific command line options from the
 
270
executable that started the process.  These options do not show up in
 
271
<code>process.argv</code>, and do not include the node executable, the name of
 
272
the script, or any options following the script name. These options
 
273
are useful in order to spawn child processes with the same execution
 
274
environment as the parent.
 
275
 
 
276
</p>
 
277
<p>Example:
 
278
 
 
279
</p>
 
280
<pre><code>$ node --harmony script.js --version</code></pre>
 
281
<p>results in process.execArgv:
 
282
 
 
283
</p>
 
284
<pre><code>[&#39;--harmony&#39;]</code></pre>
 
285
<p>and process.argv:
 
286
 
 
287
</p>
 
288
<pre><code>[&#39;/usr/local/bin/node&#39;, &#39;script.js&#39;, &#39;--version&#39;]</code></pre>
264
289
<h2>process.abort()<span><a class="mark" href="#process_process_abort" id="process_process_abort">#</a></span></h2>
265
290
<p>This causes node to emit an abort. This will cause node to exit and
266
291
generate a core file.
456
481
<h2>process.kill(pid, [signal])<span><a class="mark" href="#process_process_kill_pid_signal" id="process_process_kill_pid_signal">#</a></span></h2>
457
482
<p>Send a signal to a process. <code>pid</code> is the process id and <code>signal</code> is the
458
483
string describing the signal to send.  Signal names are strings like
459
 
&#39;SIGINT&#39; or &#39;SIGUSR1&#39;.  If omitted, the signal will be &#39;SIGTERM&#39;.
 
484
&#39;SIGINT&#39; or &#39;SIGHUP&#39;.  If omitted, the signal will be &#39;SIGTERM&#39;.
460
485
See kill(2) for more information.
461
486
 
462
487
</p>
478
503
}, 100);
479
504
 
480
505
process.kill(process.pid, &#39;SIGHUP&#39;);</code></pre>
 
506
<p>Note: SIGUSR1 is reserved by node.js.  It can be used to kickstart the
 
507
debugger.
 
508
 
 
509
</p>
481
510
<h2>process.pid<span><a class="mark" href="#process_process_pid" id="process_process_pid">#</a></span></h2>
482
511
<p>The PID of the process.
483
512
 
673
702
            <li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
674
703
        </ul>
675
704
 
676
 
        <p>Copyright <a href="http://joyent.com/">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.10.15/LICENSE">license</a>.</p>
 
705
        <p>Copyright <a href="http://joyent.com/">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.10.21/LICENSE">license</a>.</p>
677
706
    </div>
678
707
 
679
708
  <script src="../sh_main.js"></script>