Now that FD passing is in master, it'd be great to be able to use a received
socket (which has already had bind(2) and listen(2) called on it) to fire up a
new net.Server instance. This patch adds a net.Server.listenFD() method which
will start up the accept watcher on the provided FD.
The current node has a bug where it will fail to pass the option argument
immediately preceding the first non-option argument to V8. That is the
--perf flag will be ignored by V8 when running 'node --perf script.js'.
The fs.readFile bug was hiding another bug that was causing this test
to pass, even so it was broken:
require.async("../fixtures/throws_error1") in test-module-loading.js
This patch fixes the original test by running _compile within a
try..catch block for _loadScript.
_loadScriptSync also had some useless (deprecated?) code for dealing
with module entry point exceptions. This code was also removed for
greater clarity.
fs.readFile was executing a callback in a try..catch context, which is
a problem in itself. To make matters worse, it would re-execute the
same callback if there was an execution.
This patch fixes both of these problems.
a) create a layer of indirection in net.Stream to allow swapping in
different read/write implementations and
b) emit an 'fd' event when file descriptors are received over a UNIX pipe,
as finally as a tangential benefit
c) remove a bunch of conditionals from the primary codepaths for
ease-of-reading.
This adds the following options to the `configure` program
--shared-v8 Link to a shared V8 DLL instead of static linking
--shared-v8-includes=SHARED_V8_INCLUDES
Directory containing V8 header files
--shared-v8-libpath=SHARED_V8_LIBPATH
A directory to search for the shared V8 DLL
--shared-cares Link to a shared C-Ares DLL instead of static linking
--shared-cares-includes=SHARED_CARES_INCLUDES
Directory containing C-Ares header files
--shared-cares-libpath=SHARED_CARES_LIBPATH
A directory to search for the shared C-Ares DLL
--shared-libev Link to a shared libev DLL instead of static linking
--shared-libev-includes=SHARED_LIBEV_INCLUDES
Directory containing libev header files
--shared-libev-libpath=SHARED_LIBEV_LIBPATH
A directory to search for the shared libev DLL
and removes --system.
Notes:
- Currently only accepts numeric user and group ids.
- No tests, as tests depend on getpwuid and getgrgid.
- No documentation, as there is no tests and this is experimental.