Ryan Dahl
f7bc7fb031
Make sure Error object on exec() gets killed member
...
Also default to SIGTERM for destruction when exceeding timeout or buffer on
exec()
Back ported from v0.3; original commits:
bd8e4f656e
5a98fa4809
6570cd99e5
9bf2975f78
2010-10-24 12:57:57 -07:00
Ryan Dahl
ad4fb5319b
Do not spin on aceept() with EMFILE
...
When a server hit EMFILE it would continue to try to accept new connections
from the queue. This patch introduces a timeout of one second where it will
stop trying to accept new files. After the second is over it tries again.
This is a rather serious bug that has been effecting many highly concurrent
programs. It was introduced in 4593c0, version v0.2.0.
TODO: A test for this situation. Currently I test it like this
termA% cd projects/node
termA% ulimit -n 256
termA% ./node benchmark/idle_server.js
termB% cd projects/node
termB% ./node benchmark/idle_clients.js
And watch how the server process behaves.
2010-10-24 12:25:04 -07:00
Joshua Peek
13dba0d1c1
Don't flush net writeQueue on end() if its still connecting
2010-10-23 18:26:07 -07:00
Ryan Dahl
969ee3dd83
Add flag to disable colors in REPL
2010-10-23 18:16:10 -07:00
Ryan Dahl
39a2a9d1b6
TCP clients should buffer writes before connection
2010-10-23 18:15:01 -07:00
Ryan Dahl
fea3919d1b
Fix zero length buffer bug for http res.end()
...
Reported by Kadir Pekel <kadirpekel@gmail.com >
2010-10-01 16:16:00 -07:00
Marco Rogers
b5dc54c6ed
fix encoding option on ReadStream, updated test
2010-10-01 16:14:22 -07:00
Ryan Dahl
2fb393a768
Fix REPL crash on tabbing 'this.'
...
Thanks to Tim Becker for pointing this out.
2010-10-01 16:14:13 -07:00
Evan Larkin
16f736200a
fs.ReadStream: Passing null for file position on all reads except the first read of a range read.
2010-10-01 16:13:12 -07:00
Evan Larkin
d29e62d564
No longer using the global variable "stat" in unwatchFile
2010-10-01 16:11:42 -07:00
Ryan Dahl
45a01aff59
Move the http client's initParser() into prototype
2010-10-01 15:56:32 -07:00
Fedor Indutny
448cbaf395
Fixed 'upgrade' event for httpclient
...
onend and ondata was cleaning on parser end
2010-10-01 15:54:27 -07:00
Tj Holowaychuk
b8eee9c6f0
Fixed fs.ReadStream() start: 0 bug
2010-10-01 15:53:53 -07:00
Mikeal Rogers
936a038bb7
HTTP: close connection on connection:close header.
...
rnewson found a good bug in keep-alive. we were only using the request
headers we send to enable/disable keep-alive but when the server sends
Connection: close we need to close down the connection regardless.
I wrote up a patch the Robert verified makes all his test client code work
now and I also added a new unittest for it.
2010-10-01 15:53:26 -07:00
Jorge Chamorro Bieling
27f6a20fdb
sys.js: --needless Object.keys() --needless .map() in a single patch
2010-10-01 15:51:27 -07:00
Jorge Chamorro Bieling
01035714a5
sys.js: sys.inspect: show function names
2010-10-01 15:50:18 -07:00
Ryan Dahl
f6f739b3a2
Pass correct message in HTTP client upgrade
...
Simplify and correct test.
Fix by Fedor Indutny.
2010-10-01 15:49:50 -07:00
Ryan Dahl
bcbc52e257
^c to get out of '...' in REPL
2010-09-17 11:23:08 -07:00
Ryan Dahl
c00a6a7169
Simplify REPL
2010-09-17 11:23:04 -07:00
Ryan Dahl
1d8b154e14
Safe constructors for fs.ReadStream and fs.WriteStream
2010-09-17 11:22:58 -07:00
Ryan Dahl
d506a42765
Handle writeStream errors in sys.pump
2010-09-17 11:21:59 -07:00
Russell Haering
09a41a7f9c
Pass an error to the sys.pump callback if one occurs
...
- Add test case for pumping from unreadable stream.
- Document the sys.pump error handling behavior
2010-09-17 11:21:50 -07:00
Herbert Vojčík
8dcd6dccab
Common subexpression in emit.
2010-09-17 11:20:52 -07:00
Ryan Dahl
b17b28531b
shorten some lines in events.js
2010-09-17 11:18:59 -07:00
Ryan Dahl
10af67714b
Optimize emit for two arguments
2010-09-17 11:18:54 -07:00
isaacs
66bce65d33
Bug in realpath with symlinks to absolute folder paths which have children.
...
Found by Cliffano Subagio
http://groups.google.com/group/nodejs/browse_thread/thread/f46f093938265ac0/387e14da08c7dd7b ?
2010-09-17 11:17:26 -07:00
Ryan Dahl
0ddad3fbc7
Fix style in readline
2010-09-17 11:12:01 -07:00
Ryan Dahl
db6a1788b2
Add SIGWINCH handler for readline
2010-09-17 11:11:52 -07:00
Trent Mick
3191802605
add ANSI coloring option to sys.inspect and, by default, to the repl
2010-09-17 11:11:32 -07:00
Ryan Dahl
7704fb9711
Fix fs.realpathSync('/')
2010-09-10 13:31:39 -07:00
isaacs
2f071ac7d1
Fix issue #262 . Allow fs.realpath to traverse above the current working directory.
2010-09-08 17:56:34 -07:00
Ryan Dahl
35682ac88e
Fix style; undefined reference bug
2010-09-08 17:56:17 -07:00
Tobie Langel
5bbebf3593
Do not emit WriteStream's drain event before ws.write has been called.
2010-09-08 17:56:12 -07:00
Tobie Langel
0b9dab650e
Avoid closing a WriteStream before it has been opened.
2010-09-08 17:55:58 -07:00
Tobie Langel
a6659e7612
Avoid missing ref error in WriteStream.prototype.destroy().
2010-09-08 17:55:53 -07:00
Ryan Dahl
cc0164bc12
Increase ReadStream bufferSize to 64k
2010-09-08 17:48:45 -07:00
Trent Mick
ccd1304c5b
Ctrl+W support for the REPL
...
FWIW, command-line style (delete back to whitespace) would be:
leading = leading.replace(/\S+\s*$/, '');
2010-09-08 17:48:15 -07:00
Ryan Dahl
c1a4e10156
Special deepEquals for buffer
2010-09-08 17:47:23 -07:00
Ryan Dahl
b655ce5c08
typo: forceClose -> destroy for WriteStreams
2010-09-08 17:47:17 -07:00
isaacs
b2dfea0361
Treat "//some_path" as pathname rather than hostname by default.
...
Note that "//" is still a special indicator for the hostname, and this does
not change the parsing of mailto: and other "slashless" url schemes. It
does however remove some oddness in url.parse(req.url) which is the most
common use-case for the url.parse function.
2010-09-08 17:46:50 -07:00
Marco Rogers
14f16ec592
fix for fs.readFile to return string when encoding specified on zero length read
2010-09-08 17:45:26 -07:00
Marco Rogers
cdee88051d
Fixed async fs writes with length 0, it should fire the callback
2010-09-08 17:45:21 -07:00
Bradley Meck
b39b15d53f
Allow Strings for ports on net.Server.listen
2010-09-08 17:45:07 -07:00
Johan Euphrosine
c306fa241c
add readline support for meta-d
2010-09-08 17:44:13 -07:00
Ryan Dahl
416aa73946
Safe constructor: net.Server, net.Stream
2010-09-08 17:43:39 -07:00
Ryan Dahl
ad960f4462
Safe constructors: http.Server and http.Client
2010-09-08 17:43:25 -07:00
Brian
c14c445cb6
Fix home/end keys in repl for putty/xterm.
2010-09-08 17:42:47 -07:00
Russell Haering
b9ca8435f5
Modify fs.open to use accept a callback without a mode
2010-09-08 17:42:36 -07:00
Johan Euphrosine
baa24bd40e
add readline support for meta-f and meta-b
2010-09-08 17:42:23 -07:00
Johan Euphrosine
7a836ef813
add home/end support in rxvt and readline tests
2010-09-08 17:42:09 -07:00