fix: restart logger thread after fork
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 29 May 2021 16:47:29 +0000 (18:47 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 29 May 2021 16:47:29 +0000 (18:47 +0200)
commit98446561cf3c7126dd93b34c9be361fa4aa8da36
tree1d6030d5db6d5d40c0be9b07bdae4cf09031dd49
parent0368e8c09385a6c49e0d59cd6162675057e5b339
fix: restart logger thread after fork

Logging was broken when daemonizing, due to the logger thread being dead
after the fork. This can be solved by restarting the thread, if necessary
when setting the log file (which we conveniently do right after the fork).
bin/rbot
lib/rbot/ircbot.rb
lib/rbot/logger.rb