Re: [nodejs] passing socket problem (child_process or xinetd)

2013-10-10 Thread tedx
Changed my client to call res.connection.end() at the end of its request callback and now my server fires a res.connection 'close' event and I do a process.exit and it appears to work but this seems like a hack ... Ted On Thursday, October 10, 2013 10:06:16 AM UTC-5, tedx wrote: > > None of th

Re: [nodejs] passing socket problem (child_process or xinetd)

2013-10-10 Thread tedx
None of those fire :( Ted On Thursday, October 10, 2013 9:19:45 AM UTC-5, Ben Noordhuis wrote: > > On Thu, Oct 10, 2013 at 4:07 PM, tedx > > wrote: > > One other issue is that the service needs to terminate after servicing > the > > request if after res.end() I call process.exit the client ge

Re: [nodejs] passing socket problem (child_process or xinetd)

2013-10-10 Thread Ben Noordhuis
On Thu, Oct 10, 2013 at 4:07 PM, tedx wrote: > One other issue is that the service needs to terminate after servicing the > request if after res.end() I call process.exit the client get a socket > hangup error so I tried: > req.connection.on('end', function() { > process.exit(exitCode)

Re: [nodejs] passing socket problem (child_process or xinetd)

2013-10-10 Thread tedx
One other issue is that the service needs to terminate after servicing the request if after res.end() I call process.exit the client get a socket hangup error so I tried: req.connection.on('end', function() { process.exit(exitCode) }); but then the service process never terminate

Re: [nodejs] passing socket problem (child_process or xinetd)

2013-10-09 Thread tedx
Initial tests look good, thanks. Ted On Wednesday, October 9, 2013 2:38:56 PM UTC-5, Ben Noordhuis wrote: > > On Wed, Oct 9, 2013 at 9:25 PM, tedx > > wrote: > > I've written a nodejs http service that I've configured to run as an > xinetd > > service (basically the service receives the conne

Re: [nodejs] passing socket problem (child_process or xinetd)

2013-10-09 Thread Ben Noordhuis
On Wed, Oct 9, 2013 at 9:25 PM, tedx wrote: > I've written a nodejs http service that I've configured to run as an xinetd > service (basically the service receives the connected socket as > process.stdin/stdout). When the service runs it creates a http server and > then emits a 'connection' event

[nodejs] passing socket problem (child_process or xinetd)

2013-10-09 Thread tedx
I've written a nodejs http service that I've configured to run as an xinetd service (basically the service receives the connected socket as process.stdin/stdout). When the service runs it creates a http server and then emits a 'connection' event with process.stdin. server = http.createServer(c