Skip to content

Instantly share code, notes, and snippets.

@bryanwb
Created May 3, 2010 11:32
Show Gist options
  • Select an option

  • Save bryanwb/387992 to your computer and use it in GitHub Desktop.

Select an option

Save bryanwb/387992 to your computer and use it in GitHub Desktop.
var sys = require('sys');
stdin = process.openStdin();
process.addListener('SIGINT', function(){
sys.puts('Received SIGINT');
});
var timeout = function(){
setTimeout(timeout, 50);
};
setTimeout(function(){
timeout();
}, 10);
/* while loop doesn't work because it blocks the whole node process
while (true){
;
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment