diff options
author | Eric Wong <e@80x24.org> | 2015-10-28 02:03:46 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-10-28 23:22:28 +0000 |
commit | 963e6b5d24659da316fd57a91b8229683c3c6df2 (patch) | |
tree | b187d1cffb9585a59c5533880cbb4a3ec9ac7b61 /lib | |
parent | 645ba2ec8351b07da16d60a68dbce540172e1b49 (diff) | |
download | yahns-963e6b5d24659da316fd57a91b8229683c3c6df2.tar.gz |
Reduce unnecessary arguments to "exit" and "exit!". Additionally, rely on a "putnil" instruction rather than a "putstring" argument with an unnecessary string operand for an uncommon code path.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/yahns/daemon.rb | 4 | ||||
-rw-r--r-- | lib/yahns/server.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/yahns/daemon.rb b/lib/yahns/daemon.rb index a3ffd8b..fde384c 100644 --- a/lib/yahns/daemon.rb +++ b/lib/yahns/daemon.rb @@ -46,9 +46,9 @@ module Yahns::Daemon # :nodoc: master_pid = (rd.readpartial(16) rescue nil).to_i unless master_pid > 1 warn "master failed to start, check stderr log for details" - exit!(1) + exit! end - exit 0 + exit else # yahns master process yahns_server.daemon_pipe = wr end diff --git a/lib/yahns/server.rb b/lib/yahns/server.rb index 513fadb..4501d86 100644 --- a/lib/yahns/server.rb +++ b/lib/yahns/server.rb @@ -401,7 +401,7 @@ class Yahns::Server # :nodoc: @logger.info("graceful exit aborted, exiting immediately") # we will still call any app-defined at_exit hooks here # use SIGKILL if you don't want that. - exit(0) + exit end drop_acceptors # stop acceptors, we close epolls in quit_done @@ -463,7 +463,7 @@ class Yahns::Server # :nodoc: when :CHLD reap_reexec when :USR1 - usr1_reopen('') + usr1_reopen(nil) when :USR2 reexec when :HUP |