Add support for Solaris 10+.
Catch SIGINT signal.
Add debug flag.