rexec 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -3
- data/lib/rexec/daemon/base.rb +2 -0
- data/lib/rexec/daemon/controller.rb +6 -27
- data/lib/rexec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c8f85d6f0fe5127d00d90d12abd59c946b2370
|
4
|
+
data.tar.gz: a509c0b459ffdcef895ce8905e7f36a93d6fd7c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b886554d41c8dfdac084351cc8990b3f54d5483cf387bc18881a663398a630829fddaa16d77bc3ac462636e832720ddc159536308b500abfa6dc7bdc2c7346da
|
7
|
+
data.tar.gz: 96d6ff057aeb6c5c525f0b9323ef7d54fab5f736b2324220dd240e6b3752b02a01b04d6a6bbef5ce83f277be0d1696052cfcc0063c96a475bc1aa0649d32e128
|
data/.travis.yml
CHANGED
data/lib/rexec/daemon/base.rb
CHANGED
@@ -89,32 +89,11 @@ module RExec
|
|
89
89
|
$stderr.sync = true
|
90
90
|
|
91
91
|
begin
|
92
|
-
|
92
|
+
daemon.run
|
93
93
|
|
94
|
-
main = Thread.new do
|
95
|
-
begin
|
96
|
-
daemon.run
|
97
|
-
rescue
|
98
|
-
error = $!
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
94
|
trap("INT") do
|
103
|
-
|
104
|
-
daemon.shutdown
|
105
|
-
main.exit
|
106
|
-
rescue
|
107
|
-
error = $!
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
trap("TERM") do
|
112
|
-
exit!
|
95
|
+
daemon.shutdown
|
113
96
|
end
|
114
|
-
|
115
|
-
main.join
|
116
|
-
|
117
|
-
raise error if error
|
118
97
|
rescue
|
119
98
|
$stderr.puts "=== Daemon Exception Backtrace @ #{Time.now.to_s} ==="
|
120
99
|
$stderr.puts "#{$!.class}: #{$!.message}"
|
@@ -184,8 +163,8 @@ module RExec
|
|
184
163
|
return
|
185
164
|
end
|
186
165
|
|
187
|
-
|
188
|
-
Process.kill("INT",
|
166
|
+
pgid = -Process.getpgid(pid)
|
167
|
+
Process.kill("INT", pgid)
|
189
168
|
sleep 0.1
|
190
169
|
|
191
170
|
sleep 1 if ProcessFile.running(daemon)
|
@@ -196,8 +175,8 @@ module RExec
|
|
196
175
|
while ProcessFile.running(daemon) and attempts > 0
|
197
176
|
sig = (attempts >= 2) ? "KILL" : "TERM"
|
198
177
|
|
199
|
-
puts "Sending #{sig} to
|
200
|
-
Process.kill(sig,
|
178
|
+
puts "Sending #{sig} to process group #{pgid}...".color(:red)
|
179
|
+
Process.kill(sig, pgid)
|
201
180
|
|
202
181
|
attempts -= 1
|
203
182
|
sleep 1
|
data/lib/rexec/version.rb
CHANGED