god 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +8 -0
- data/Rakefile +1 -1
- data/ext/god/netlink_handler.c +2 -1
- data/lib/god.rb +9 -1
- data/lib/god/process.rb +6 -2
- data/test/helper.rb +6 -0
- metadata +1 -1
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/ext/god/netlink_handler.c
CHANGED
@@ -126,8 +126,9 @@ connect_to_netlink()
|
|
126
126
|
msg->id.val = CN_VAL_PROC;
|
127
127
|
msg->seq = 0;
|
128
128
|
msg->ack = 0;
|
129
|
+
msg->flags = 0;
|
129
130
|
msg->len = sizeof(int);
|
130
|
-
msg->data
|
131
|
+
*(int*)msg->data = PROC_CN_MCAST_LISTEN;
|
131
132
|
|
132
133
|
if (-1 == send(nl_sock, hdr, hdr->nlmsg_len, 0)) {
|
133
134
|
rb_raise(rb_eStandardError, strerror(errno));
|
data/lib/god.rb
CHANGED
@@ -52,8 +52,16 @@ end
|
|
52
52
|
|
53
53
|
God::EventHandler.load
|
54
54
|
|
55
|
+
module Kernel
|
56
|
+
# Override abort to exit without executing the at_exit hook
|
57
|
+
def abort(text)
|
58
|
+
puts text
|
59
|
+
exit!
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
55
63
|
module God
|
56
|
-
VERSION = '0.4.
|
64
|
+
VERSION = '0.4.3'
|
57
65
|
|
58
66
|
LOG = Logger.new
|
59
67
|
|
data/lib/god/process.rb
CHANGED
@@ -12,8 +12,12 @@ module God
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def alive?
|
15
|
-
|
16
|
-
|
15
|
+
begin
|
16
|
+
pid = File.read(self.pid_file).strip.to_i
|
17
|
+
System::Process.new(pid).exists?
|
18
|
+
rescue Errno::ENOENT
|
19
|
+
false
|
20
|
+
end
|
17
21
|
end
|
18
22
|
|
19
23
|
def valid?
|
data/test/helper.rb
CHANGED