src: fix deferred events not working with -e
authorBen Noordhuis <info@bnoordhuis.nl>
Mon, 25 May 2015 14:37:49 +0000 (16:37 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Tue, 26 May 2015 15:16:48 +0000 (17:16 +0200)
commit93a44d5228b2e1a885f6279f06c4175c174246be
treed2acd192f32bba94d354686742e8d2052cfeef66
parenteb1856dfd14a2767993a72698b253051cc0b7d3b
src: fix deferred events not working with -e

Defer evaluation of the script for a tick.  This is a workaround for
events not firing when evaluating scripts on the command line with -e.

Fixes: https://github.com/nodejs/io.js/issues/1600
PR-URL: https://github.com/nodejs/io.js/pull/1793
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
src/node.js
test/message/eval_messages.out
test/message/stdin_messages.out
test/parallel/test-cli-eval-event.js [new file with mode: 0644]