Nathan Rajlich
a9a252fda9
Read up the prototype of the 'env' object.
Closes GH-713.
14 years ago
Ryan Dahl
cb06abe1e5
Helpful error when child_process.exec hit maxBuffer
14 years ago
Ryan Dahl
9e976abad9
lint
14 years ago
Bert Belder
6ad629895d
Make child_process.kill always work on windows
14 years ago
isaacs
6f5d95de6d
child_process: Add gid/uid flags to spawn config
This is mostly working, but not completely ideal for two reasons.
1. Rather than emitting an error on the ChildProcess object when the
setgid/setuid fails, it is simply printing the error to stderr and
exiting. The same happens with the cwd, so that's not completely
terrible.
2. I don't have a good test for this. It fails with an EPERM if you try
to change the uid or gid as a non-root user.
14 years ago
Ryan Dahl
63bd237892
typo setuid -> setsid
14 years ago
Ryan Dahl
202dd8387f
Add setsid option to child_process
14 years ago
Ryan Dahl
11ea8da9c3
lint child_process.js
14 years ago
Travis Swicegood
22cf5a24db
Simplify execution from "big if statement"
This code is functionally equivalent, but in a simpler form. Now new
parameters to `execFile` do not require `exec` to be refactored.
14 years ago
Travis Swicegood
e514f575f3
Remove cruft that dealt with env parameter
Originally added in commit 078a48a9
, this code dealt with an optional
env parameter that was passed to `exec`. The parameter was removed, but
this code was left. As it serves no purpose, removing it.
14 years ago
Travis Swicegood
86727b15f3
fix a typo in comment
fixes issue 464
14 years ago
Ryan Dahl
9bf2975f78
Make sure Error object on exec() gets killed member
Also default to SIGTERM for destruction when exceeding timeout or buffer on
exec()
14 years ago
Ryan Dahl
6570cd99e5
Fix execFile timeouts, improve tests
It seems that a parent will not get a SIGCHLD if the child is killed by the
parent? It's unclear, so make 'exit' callback manually.
14 years ago
Ryan Dahl
5a98fa4809
ChildProcesses cannot be killed if pid is missing
14 years ago
Aaron Heckmann
bd8e4f656e
Prevents child_process.exec timeouts from throwing when the child was previously killed.
14 years ago
Micheil Smith
e38eb0c5a4
Soft migration of sys -> util, Removal of deprecated utils module.
14 years ago
Ryan Dahl
f23eb282c0
Fix style
14 years ago
Joshaven Potter
3d4e4d8909
syntax fixes to pass jslint
14 years ago
Aaron Heckmann
7c5cc57ece
quicker loops
14 years ago
Ryan Dahl
6eca948ca2
Move constants out of process object
14 years ago
Bert Belder
7d4e8a9a71
If no options are given to child_process.spawn, env should default to process.env
Regression.
14 years ago
Bert Belder
aaa1f451e6
Expose cwd option to child_process.exec()
14 years ago
Bert Belder
94914135df
New api for child_process.spawn; ability to set cwd for spawn()ed process
Tests for child_process.spawn() use new API
Test for deprecated child_process.spawn() API
14 years ago
Ryan Dahl
7067a7155f
Specify env differently in execFile
Callbacks should always be the last argument.
14 years ago
Сергей Крыжановский
078a48a97b
added env to child_process.exec
15 years ago
Ryan Dahl
d700a6f74a
Return child from execFile
15 years ago
Orlando Vazquez
92da636b97
Add a parameter to spawn() that sets the child's stdio file descriptors.
After the child is forked, these file descriptors will get dup2()'d to STDIN,
STDIO, and STDERR.
(API may be changed.)
15 years ago
Ryan Dahl
d38d96eb61
Don't emit 'exit' twice from child process
15 years ago
Ryan Dahl
264e540d00
Fix error reporting in child_process callbacks
Issue 120, test case by Nathan Ostgard
15 years ago
Felix Geisendörfer
f8a3cf980f
Properly handle child process exit codes
The child process 'exit' was returning the status of the process, rather than
the exit code. This patch properly deconstructs the status into the exit code
and the term signal a process may have received.
See:
http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#Watcher_Specific_Functions_and_Data_-5
and waitpid(2)
15 years ago
Ryan Dahl
4efe27bbab
Add execFile() for Orlando
Undocumented for now, but basically like exec() with args.
15 years ago
Ryan Dahl
9cf2a02d8b
Add timeout and maxBuffer options to child_process.exec
15 years ago
Tim Caswell
62d9852c3d
Replace slow and broken for..in loops with faster for loops over the keys.
15 years ago
Tim Caswell
ff56d6364e
Fix child_process to use end() instead of close() in the stdin stream.
15 years ago
Ryan Dahl
b8bb6e9007
Close child process stdin on SIGCHLD
15 years ago
Ryan Dahl
1332cafb7c
s/Socket/Stream/g
15 years ago
Ryan Dahl
04c06b9149
child process now use net.Socket
15 years ago