Fixed SIGINT handling, so we can have our newline

We trap the INT in the install process now so the newline race condition is avoided. Much neater and more polished now.
This commit is contained in:
Max Howell 2009-10-26 18:23:28 +00:00
parent e587c68a2a
commit 173f5f4a87

View File

@ -235,13 +235,10 @@ rescue UsageError
puts ARGV.usage puts ARGV.usage
exit 1 exit 1
rescue SystemExit rescue SystemExit
ohai "Kernel.exit" if ARGV.verbose? puts "Kernel.exit" if ARGV.verbose?
exit 1 exit 1
rescue Interrupt => e rescue Interrupt => e
# puts # seemingly a newline is typical puts # seemingly a newline is typical
# Above is now commented out because the system() call forks and then forks
# again, so there are two of "us" so we get two exceptions raising and thus
# two newlines, which buggers up the shell. FIXME!
exit 130 exit 130
rescue SystemCallError, RuntimeError => e rescue SystemCallError, RuntimeError => e
if ARGV.debug? if ARGV.debug?