Add signal handlers so we clean up before exiting.
authorTom Hughes <tom.hughes@palm.com>
Tue, 12 Oct 2010 21:01:58 +0000 (14:01 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 12 Oct 2010 21:01:58 +0000 (14:01 -0700)
commitf61b110cf6d77044e813499ec6ce667813a697cd
treefe28444e3c172b851eaed49bd698b476d0c690c1
parent0fcb3bd3a9f585562c5b421314c206c9438f6cef
Add signal handlers so we clean up before exiting.

Add SIGTERM and SIGINT signal handlers so that we run the exit handlers
before exiting when getting these signals. Fixes an issue where we
couldn't run vi after CTRL+C'ing node because the stdin fd was left
non-blocking.
src/node.cc