X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bin%2Fsup;h=e53a8e8bfafa2fcffa00cf89d1e75fa26eb62bec;hb=82a14a27c9cf43ce7137e583330c412d90a1eb9a;hp=3d5b6c1da0207cd0ec41b8756522f3a4c6880a4b;hpb=afeaf4393206cce3f4b91d40ec50fae2ba0e6f2f;p=sup diff --git a/bin/sup b/bin/sup index 3d5b6c1..e53a8e8 100755 --- a/bin/sup +++ b/bin/sup @@ -58,6 +58,7 @@ if $opts[:list_hooks] end Thread.abort_on_exception = true # make debugging possible +Thread.current.priority = 1 # keep ui responsive module Redwood @@ -169,6 +170,9 @@ begin lmode.on_kill { Logger.clear! } Logger.add_sink lmode Logger.force_message "Welcome to Sup! Log level is set to #{Logger.level}." + if Logger::LEVELS.index(Logger.level) > 0 + Logger.force_message "For more verbose logging, restart with SUP_LOG_LEVEL=#{Logger::LEVELS[Logger::LEVELS.index(Logger.level)-1]}." + end debug "initializing inbox buffer" imode = InboxMode.new @@ -207,7 +211,7 @@ begin until Redwood::exceptions.nonempty? || $die c = begin Ncurses.nonblocking_getch - rescue Interrupt => e + rescue Interrupt raise if BufferManager.ask_yes_or_no "Die ungracefully now?" BufferManager.draw_screen nil