Ryan Dahl
63bd237892
typo setuid -> setsid
14 years ago
Ryan Dahl
202dd8387f
Add setsid option to child_process
14 years ago
Bert Belder
0a2f1cb334
Child processes
14 years ago
Bert Belder
b4510d57dc
There is no child process support for windows yet
14 years ago
Tom Hughes
7fcfb7b981
Fix memleak in ChildProcess:Spawn().
14 years ago
Ben Noordhuis
80b5a52217
Fix compiler warnings.
14 years ago
Guillaume Tuton
07da49b095
Set FD_CLOEXEC flag on stdio FDs before spawning.
With regression test.
14 years ago
Rasmus Andersson
50443f08e0
environ symbol fix for Mac OS X
14 years ago
Ryan Dahl
6eca948ca2
Move constants out of process object
15 years ago
Ryan Dahl
5be6ab6cdb
Fix style
15 years ago
Ryan Dahl
f4f05a8851
Unset CLOEXEC on spawn's customFds
15 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
15 years ago
isaacs
1a1214866f
SetBlocking should set blocking, not toggle it
15 years ago
isaacs
e9aacd40c6
When the parent's stdio FDs are passed to a child, make them temporarily blocking.
Many programs do not handle non-blocking stdio very well. In particular,
man and less have serious problems with this, and since stdout isn't being
flushed after each write, the output jumps about on the screen as you page
down. Programs that do use non-blocking stdio will set that flag themselves
(as node does).
This puts the stdio file descriptors into blocking mode before sharing them
with the child process, so that one could spawn a vim subprocess, or some
other program that depends on blocking IO.
15 years ago
Paul Querna
4f7f43762d
Move child process to extension model.
15 years ago
Ruben Rodriguez
242161bef2
Added new API to Script, and implemented it in the REPL
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
Brian White
ab5c0dd63e
Port to OpenBSD
15 years ago
Ryan Dahl
8e5b91c79b
Revert "Check for strings.h"
This reverts commit 032f651824
.
15 years ago
Ryan Dahl
032f651824
Check for strings.h
15 years ago
Herbert Vojčík
5d9753fccf
Fix child_process.cc build failure for FreeBSD.
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
765f0cdece
Fix ChildProcess::Kill
15 years ago
Ryan Dahl
bfdc421dda
Don't kill negative PIDs
Fixes issue GH-79.
15 years ago
Ryan Dahl
04c06b9149
child process now use net.Socket
15 years ago
Ryan Dahl
d5ee777af2
Don't allow child process to clobber environ
15 years ago
Ryan Dahl
769a35024f
Allow passing env to child process
15 years ago
Ryan Dahl
46ebaa00ce
Encoding 0 length data, returns '' instead of null
15 years ago
Jonas Pfenniger
7a755e04a9
Was using the old node object to get the int from the constant.
15 years ago
Ryan Dahl
45a806a066
Statically define symbols
~7% improvement in hello world HTTP response bench.
15 years ago
Ryan Dahl
c1baa70fe5
Attach/Detach -> Ref/Unref
15 years ago
Ryan Dahl
a5df0f6a65
Prefix all source files with node_
15 years ago
Ryan Dahl
3456a16f71
Accept string representations of signals in node.kill and child.kill
15 years ago
Ryan Dahl
82465fc4b1
Do not use /bin/sh to create child processes.
Instead directly call execvp(). This change is needed for the
soon-to-be-added signal handlers because the /bin/sh parent process does not
pass all signals to it's children, particularly SIGUSR1 on Linux.
The parameters of createChildProcess had to be changed slightly.
utils.exec() also has a changed implementation. A bug involving quoted
arguments was knowingly introduced into utils.exec(). Will fix later.
15 years ago
Ryan Dahl
602f9dbf3f
SetClassName on internal classes.
16 years ago
Ryan Dahl
663deb3828
delete[] instead of delete for arrays.
16 years ago
Ryan Dahl
f389f923b8
Remove erroneously placed EV_DEFAULT_UC_
16 years ago
Ryan
227638bac1
Lint
16 years ago
Ryan
393caeb4c9
Add Exception::Error where missing.
16 years ago
Ryan
21a1b045f5
Byte stream to V8 decoding and encoding.
This does not (should not) change behavior. Pulls those two functions
(encode/decode) out into node.cc.
16 years ago
Ryan
ad9d683f9f
API: rename node.Process to node.ChildProcess
This is to avoid confusion with the global "process" object, especially for
the instances of node.Process.
16 years ago
Ryan
8658999c7d
Refactor node.Process to take advantage of evcom_reader/writer.
16 years ago
Ryan
b849d50288
Remove unused symbols.
16 years ago
Ryan
0fb0af3a6c
Rename evnet to evcom.
16 years ago
Ryan
c5ab0d5a80
Upgrade liboi, which is now called evnet.
16 years ago
Ryan
22c3a1e2a5
Templatize ObjectWrap::Unwrap. Remove NODE_UNWRAP macro.
16 years ago
Ryan
1fc4dce08b
Simplify and cleanup ObjectWrap.
Simplify and inline ObjectWrap::Wrap
Inline and clean up ObjectWrap::Unwrap
Move ObjectWrap into its own file.
Remove handle from ObjectWrap constructor. add obj->Wrap(handle)
Simplify Attach/Detach in ObjectWrap
Remove ObjectWrap::InformV8ofAllocation. (Too messy/complex.)
16 years ago
Ryan
d56552dc66
Remove node.Process constructor from API
16 years ago
Ryan
d428eff023
Snakecase events .
16 years ago
Ryan
e876d6629e
Fix unused variable warnings.
16 years ago