bluepill 0.0.42 → 0.0.43
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bluepill.gemspec +2 -2
- data/lib/bluepill.rb +1 -1
- data/lib/bluepill/system.rb +4 -4
- data/lib/bluepill/util/rotational_array.rb +6 -0
- data/lib/bluepill/version.rb +1 -1
- data/lib/example.rb +3 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.43
|
data/bluepill.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bluepill}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.43"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Arya Asemanfar", "Gary Tsang", "Rohith Ravi"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-18}
|
13
13
|
s.default_executable = %q{bluepill}
|
14
14
|
s.description = %q{Bluepill keeps your daemons up while taking up as little resources as possible. After all you probably want the resources of your server to be used by whatever daemons you are running rather than the thing that's supposed to make sure they are brought back up, should they die or misbehave.}
|
15
15
|
s.email = %q{entombedvirus@gmail.com}
|
data/lib/bluepill.rb
CHANGED
data/lib/bluepill/system.rb
CHANGED
@@ -33,11 +33,11 @@ module Bluepill
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def get_children(parent_pid)
|
36
|
-
Array.new
|
37
|
-
|
38
|
-
|
39
|
-
end
|
36
|
+
child_pids = Array.new
|
37
|
+
ps_axu.each_pair do |pid, chunks|
|
38
|
+
child_pids << chunks[IDX_MAP[:pid]].to_i if chunks[IDX_MAP[:ppid]].to_i == parent_pid.to_i
|
40
39
|
end
|
40
|
+
child_pids
|
41
41
|
end
|
42
42
|
|
43
43
|
# Returns the pid of the child that executes the cmd
|
data/lib/bluepill/version.rb
CHANGED
data/lib/example.rb
CHANGED
@@ -6,7 +6,7 @@ ROOT_DIR = "/tmp/bp"
|
|
6
6
|
|
7
7
|
# Watch with
|
8
8
|
# watch -n0.2 'ps axu | egrep "(CPU|forking|bluepill|sleep)" | grep -v grep | sort'
|
9
|
-
Bluepill.application(:sample_app) do |app|
|
9
|
+
Bluepill.application(:sample_app, :base_dir => "/tmp/bluepill") do |app|
|
10
10
|
0.times do |i|
|
11
11
|
app.process("process_#{i}") do |process|
|
12
12
|
process.pid_file = "#{ROOT_DIR}/pids/process_#{i}.pid"
|
@@ -63,8 +63,8 @@ Bluepill.application(:sample_app) do |app|
|
|
63
63
|
|
64
64
|
1.times do |i|
|
65
65
|
app.process("group_process_#{i}") do |process|
|
66
|
-
process.uid = "rohith"
|
67
|
-
process.gid = "wheel"
|
66
|
+
# process.uid = "rohith"
|
67
|
+
# process.gid = "wheel"
|
68
68
|
|
69
69
|
process.stderr = "/tmp/err.log"
|
70
70
|
process.stdout = "/tmp/err.log"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bluepill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 73
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 43
|
10
|
+
version: 0.0.43
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Arya Asemanfar
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-09-18 00:00:00 -07:00
|
21
21
|
default_executable: bluepill
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|