Ryan Dahl
ce9caa237f
Fix #1563 . overflow in ChildProcess custom_fd.
Backported from master f5db3f1f85
14 years ago
Ryan Dahl
f5db3f1f85
Fix #1563 . overflow in ChildProcess custom_fd.
14 years ago
Ryan Dahl
337c48db5f
Rename spawnNode to fork
14 years ago
Ryan Dahl
9e26dab150
child_process.spawnNode
For making easy worker processes.
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
isaacs
bc8e9b340d
Closes GH-734 Do the setuid() after chdir()
14 years ago
Ryan Dahl
4f8dd28f7e
wscript chooses win32 source files, not cpp
14 years ago
Bert Belder
6ad629895d
Make child_process.kill always work on windows
14 years ago
isaacs
435ece5058
child_process: Support setting uid/gid by name
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
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