Skip to content

Commit

Permalink
v0.4.16 - hangup
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wilhelm committed Dec 22, 2013
2 parents 2630a07 + c55d511 commit ae4f101
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.4.16

* hangup - disable distant signal traps/ignores

# 0.4.15

* collectors/iostat - compat for older (v9.x) sysstat
Expand Down
13 changes: 12 additions & 1 deletion bin/panoptimon
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,16 @@ if opts.daemonize
# but this has support for redirecting io to logfiles... worth it?
Daemons.daemonize(
app_name: Pathname.new($0).basename.to_s,
log_output: true)
log_output: true,
)

# TODO fancier method of reloading config? Note that we only need to
# trap HUP when using daemonize (which ignores it before forking.)
# NOTE said fancy method would require major refactor of this file.
trap('HUP') {
monitor.logger.warn 'Hangup...'
monitor.stop
}
end

# TODO maybe split config loading / init across daemonize for better
Expand All @@ -120,4 +129,6 @@ EM.run {
monitor.run
}

monitor.logger.warn 'Bye.'

# vim:ts=2:sw=2:et:sta
2 changes: 1 addition & 1 deletion lib/panoptimon/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize (args={})
@match = []
@mount = []
# TODO args[:config].http_port, ssl, etc
@http = Thin::Server.new('0.0.0.0', 8080, self);
@http = Thin::Server.new('0.0.0.0', 8080, self, signals: false);
end

def start
Expand Down
2 changes: 1 addition & 1 deletion lib/panoptimon/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (C) 2012-2013 Sourcefire, Inc.

module Panoptimon
VERSION = "0.4.15"
VERSION = "0.4.16"
end

0 comments on commit ae4f101

Please sign in to comment.