projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b27361
)
Remove asciiSlice from docs
author
Ryan Dahl
<ry@tinyclouds.org>
Wed, 23 Mar 2011 22:01:49 +0000
(15:01 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Wed, 23 Mar 2011 22:02:11 +0000
(15:02 -0700)
doc/api/child_processes.markdown
patch
|
blob
|
history
diff --git
a/doc/api/child_processes.markdown
b/doc/api/child_processes.markdown
index
804056b
..
b30de4b
100644
(file)
--- a/
doc/api/child_processes.markdown
+++ b/
doc/api/child_processes.markdown
@@
-130,8
+130,9
@@
Example of checking for failed exec:
var spawn = require('child_process').spawn,
child = spawn('bad_command');
+ child.stderr.setEncoding('utf8');
child.stderr.on('data', function (data) {
- if (/^execvp\(\)/.test(data
.asciiSlice(0,data.length)
)) {
+ if (/^execvp\(\)/.test(data)) {
console.log('Failed to start child process.');
}
});