bluepill 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bluepill.gemspec +1 -1
  3. data/lib/bluepill/system.rb +10 -10
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.12
1
+ 0.0.13
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bluepill}
8
- s.version = "0.0.12"
8
+ s.version = "0.0.13"
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"]
@@ -49,20 +49,20 @@ module Bluepill
49
49
  else
50
50
  # child
51
51
  rd.close
52
-
52
+
53
53
  drop_privileges(options[:uid], options[:gid])
54
-
54
+
55
55
  to_daemonize = lambda do
56
- Dir.chdir(options[:working_dir]) if options[:working_dir]
57
- ::Kernel.exec(cmd)
58
- exit
59
- end
60
-
56
+ Dir.chdir(ENV["PWD"] = options[:working_dir]) if options[:working_dir]
57
+ ::Kernel.exec(cmd)
58
+ exit
59
+ end
60
+
61
61
  daemon_id = Daemonize.call_as_daemon(to_daemonize, nil, cmd)
62
-
62
+
63
63
  wr.write daemon_id
64
64
  wr.close
65
-
65
+
66
66
  exit
67
67
  end
68
68
  end
@@ -94,7 +94,7 @@ module Bluepill
94
94
  # grandchild
95
95
  drop_privileges(options[:uid], options[:gid])
96
96
 
97
- Dir.chdir(options[:working_dir]) if options[:working_dir]
97
+ Dir.chdir(ENV["PWD"] = options[:working_dir]) if options[:working_dir]
98
98
 
99
99
  # close unused fds so ancestors wont hang. This line is the only reason we are not
100
100
  # using something like popen3. If this fd is not closed, the .read call on the parent
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluepill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arya Asemanfar