Ryan
7363ccd273
bugfix: Properly exit a process.
...
This requires that onExit() is not called immediately upon receiving a
SIGCHLD. There could still be data in the pipez. So, instead just set a
flag and invoke the pipe watchers.
Sometimes one will not receive an EOF from pipes because the process was
killed by a SIGTERM, or something. If SIGCHLD has been recved but we are
getting EAGAIN, the pipez need to be closed too.
2009-06-24 13:44:12 +02:00
Ryan
0e67b34c27
Fix thread pool unref issue.
...
Tests were silently failing since f56309d...
Since the eio_watcher is now not counted in the list of active watchers, we
need to explicitly tell the ev_loop not to exit when entering the thread
pool.
2009-06-23 11:27:18 +02:00
Ryan
0ff62b2ea0
Move oi_buf creation to node.cc
2009-06-22 19:48:02 +02:00
Ryan
f56309deee
Remove eio_warmup. Use ev_ref instead.
2009-06-22 19:32:42 +02:00
Ryan
dce072a67e
lint
2009-06-22 13:12:47 +02:00
Ryan
00d9b886c1
Remove unnecessary Detach
2009-06-21 23:28:12 +02:00
Urban Hafner
ea290e727d
Finished remote module loading
2009-06-21 16:59:11 +02:00
Urban Hafner
ad15067ea0
Tests and implementation of node.cat()
2009-06-21 16:40:08 +02:00
Urban Hafner
c192a1b5df
Update to use the new parseUri()
2009-06-21 16:28:58 +02:00
Urban Hafner
6550e8cfa0
Remove empty parts of the parsed URI.
2009-06-21 16:28:23 +02:00
Urban Hafner
3a44efea69
Merge branch 'master' of git://github.com/ry/node
2009-06-21 16:10:20 +02:00
Ryan
0f76d3e6d8
define signal constants
2009-06-21 13:50:13 +02:00
Ryan
e39923a3d7
Add process.kill(sig = SIGTERM)
2009-06-21 13:41:03 +02:00
Ryan
2fd4958698
Add pid accessor
2009-06-21 13:29:15 +02:00
Ryan
a78ea510a2
Add onExit callback
2009-06-21 13:18:00 +02:00
Ryan
03c5772ce4
Get stdin/stdout working. Add process->Close().
2009-06-21 13:10:00 +02:00
Ryan
83cb156b6f
skelton of node.Process
2009-06-20 16:55:40 +02:00
Ryan
25d14bd001
Bug: Add HTTPConnection->size() and HTTPServer->size()
...
Need this for proper garbage collection.
2009-06-20 15:17:54 +02:00
Urban Hafner
fc63f840b0
Merge branch 'master' of git://github.com/ry/node
2009-06-19 09:03:24 +02:00
Ryan
7ec90dbfd0
Clean up debug code in net.cc
2009-06-18 15:35:02 +02:00
Ryan
2b557c467f
Namespace trimming: remove node.constants
2009-06-18 14:58:17 +02:00
Ryan
e30e4415ee
Fixes for ipv6
2009-06-18 14:34:49 +02:00
Urban Hafner
5ad5d89e3f
Merge branch 'master' of git://github.com/ry/node
2009-06-18 09:27:12 +02:00
Ryan
27b268b8c1
Clean ups
2009-06-17 15:05:44 +02:00
Ryan
b3b6f8c02e
Accept ports represented as strings
2009-06-17 10:16:48 +02:00
Urban Hafner
ce85f84d15
Implementation of node.http.cat
2009-06-17 08:52:47 +02:00
Ryan
d77f757745
Fix test-http-client-race bug
2009-06-16 20:53:15 +02:00
Ryan
193283bc38
Fix memleak: freeaddrinfo() after Server resolve address.
2009-06-16 17:47:59 +02:00
Ryan
225637a15c
Resolve should default to IPv4 address.
2009-06-16 17:43:40 +02:00
Ryan
3b05cf260e
Add "opening" readyState for the resolve period.
2009-06-16 15:50:52 +02:00
Ryan
7cce31d4e4
Add global print() function.
2009-06-15 16:57:10 +02:00
Ryan
870b5db46c
Bugfix+Refactor: accessing HTTP connection remoteAddress
2009-06-15 15:29:32 +02:00
Ryan
dcf5e72036
Fiddle with remoteAddress
2009-06-15 14:35:02 +02:00
Ryan
6697cd0725
small superficial clean-ups
2009-06-13 16:47:09 +02:00
Ryan
916b9ca715
Add Request objects on the HTTP server can be interrupted.
2009-06-12 17:37:43 +02:00
Ryan
825d7a8be8
Remove unused HTTPConnection destructor
2009-06-12 17:30:37 +02:00
Ryan
3a0de007aa
onBodyComplete was not getting called in HTTP server
2009-06-12 15:26:06 +02:00
Ryan
f657a6324a
Fix comment/test for Mac getaddinfo() bug.
...
Note: the test case was broken because on Macintosh the client connects
synchronously. This is undesirable but ok for now.
2009-06-11 11:42:43 +02:00
Ryan
6bfcfa7d74
remove unnecessary pthread header
2009-06-10 19:05:54 +02:00
Ryan
080fa54a85
fix for issue 3; but now experiencing segfault on linux
2009-06-10 18:29:59 +02:00
Ryan
0d780fe6b8
Free pointer with delete, since created with new
2009-06-10 15:24:14 +02:00
Ryan
2641582399
Extra header to work with freebsd
2009-06-09 17:47:42 +02:00
Ryan
88c04e74c9
Add HTTP proxy test. Fix bug in http.Server.
...
was not properly inheriting http.Server from http.LowLevelServer.
2009-06-09 14:10:53 +02:00
Ryan
ddac43f4ba
Allow for absolute paths to specify root module
2009-06-09 10:06:04 +02:00
Ryan
8c146dfa0b
Don't use AI_NUMERICSERV. Doesn't work on mac.
2009-06-08 23:56:09 +02:00
Ryan
8b49cef10b
Modify the tests to use onExit hook.
...
No need to rely on stdout output now.
onExit callbacks should print stack trace from onExit failure
2009-06-08 19:10:36 +02:00
Ryan
f6a7fe2657
Implement onExit() hook for modules.
...
onExit() is similar to the onLoad() callback. onExit() is called on each
module just before the process exits. This can be used to check state in
unit tests, but not to perform I/O. The process will forcibly exit as soon
as all of the onExit callbacks are made.
2009-06-08 16:17:33 +02:00
Ryan
b6fe4aec50
Module system refactor
...
There is one major API change in the refactor: filename extensions are now
required when requiring or including modules.
Added extra test to test-module-loading.js.
2009-06-08 15:34:15 +02:00
Ryan
887f056923
Do not assume transfer-encoding: chunked as default on requests.
...
If users do not send transfer-encoding or content-length headers, then I
will not add any additional. Content-Length: 0 is assumed if there aren't
other headers and chunked encoding is rare.
2009-06-06 23:57:15 +02:00
Ryan
5558bc4e6e
Add connection.remoteAddress for server-side node.tcp.Connections.
2009-06-05 20:15:54 +02:00