joyent/node — Issue #1943: When running node on windows with php's proc_open() it crashes with Unknown system errno 10106
Author: Shyru
Created: 2011-10-26 06:41:38+00:00
State: open

We have a small wrapper script (written in php) that starts node with a given javascript file.
To read and write to nodes stdin/stdout we use proc_open() of php. When doing this, node crashes with this exception:

```
node.js:202
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: listen Unknown system errno 10106
at errnoException (net.js:589:11)
at Array. (net.js:664:28)
at EventEmitter._tickCallback (node.js:194:26)
```
Our node server uses faye (http://faye.jcoglan.com/node.html) to listen on port 8000 for incoming requests.
Fore reference this is the script we are trying to execute:

```javascript
console.log("startup");
var http = require('http'),
faye = require('faye');

var bayeux = new faye.NodeAdapter({mount: '/faye', timeout: 45});

bayeux.listen(8000);
console.log("running");
```
Note: I dont get the output 'startup' or 'running' from inside php.

__Important:__ When running node from commandline with this script, everything works perfectly! Its just that starting it from php with proc_open() makes it go crazy!
Any idea what could be the cause of this?