svutil 0.9.10 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/svutil.rb +1 -1
- data/lib/svutil/process_manager.rb +8 -5
- metadata +8 -8
data/lib/svutil.rb
CHANGED
@@ -25,9 +25,7 @@ module SVUtil
|
|
25
25
|
write_pid_file
|
26
26
|
begin
|
27
27
|
@server_instance.run
|
28
|
-
rescue
|
29
|
-
shutdown("System Exited")
|
30
|
-
rescue Exception => e
|
28
|
+
rescue StandardError => e
|
31
29
|
Log.error(e.message)
|
32
30
|
Log.error(e.backtrace.join("\n")) if @config.trace
|
33
31
|
shutdown("Process Completed with Error", 1)
|
@@ -44,7 +42,7 @@ module SVUtil
|
|
44
42
|
Log.info "Shutting Down (#{reason})"
|
45
43
|
begin
|
46
44
|
@server_instance.shutdown if @server_instance.respond_to?(:shutdown)
|
47
|
-
rescue
|
45
|
+
rescue StandardError => e
|
48
46
|
Log.error("Shutdown Callback threw error: #{e.message}")
|
49
47
|
Log.error("Shutdown Callback threw error: #{e.backtrace}") if @config.trace
|
50
48
|
Log.info("Shuting down anyway")
|
@@ -73,7 +71,12 @@ module SVUtil
|
|
73
71
|
end
|
74
72
|
|
75
73
|
def daemonize
|
76
|
-
|
74
|
+
pid = fork
|
75
|
+
if pid
|
76
|
+
Log.info("Forked with PID = #{pid}")
|
77
|
+
Process.detach(pid)
|
78
|
+
exit! # Exit but do not call at_exit
|
79
|
+
end
|
77
80
|
redirect_io
|
78
81
|
@after_fork.call unless @after_fork.nil?
|
79
82
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svutil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-17 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: newgem
|
16
|
-
requirement: &
|
16
|
+
requirement: &70299924112740 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.5.3
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70299924112740
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hoe
|
27
|
-
requirement: &
|
27
|
+
requirement: &70299924110120 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '2.12'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70299924110120
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rdoc
|
38
|
-
requirement: &
|
38
|
+
requirement: &70299920280180 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '3.10'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70299920280180
|
47
47
|
description: A simple managed process builder for Ruby projects
|
48
48
|
email:
|
49
49
|
- daniel@netfox.com
|