mixlib-shellout 1.6.0.rc.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mixlib/shellout/unix.rb +2 -29
- data/lib/mixlib/shellout/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c5438feb4cca570fca5c9a9e1566ae6df1696d7
|
4
|
+
data.tar.gz: 42219e3a8e1a6300d72aeb63924dab765bbc5f0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31a81beb7022501bff7f57ff17eb91f97fc472f1b86199260d06910b8d1a05d68ac04d4908da39b7ecf5b8170f79402f0702a21d06ac044f4ae11b340a7545f6
|
7
|
+
data.tar.gz: 393c9b543d50e6c03f00b478a4903ea42cb4edb9fb9e93a9eabfbef9e2a541a837403ea77dff1d6dda8808dd64a1e0a5ce71545e551ed158b17d4fe85dedde91
|
data/lib/mixlib/shellout/unix.rb
CHANGED
@@ -121,8 +121,8 @@ module Mixlib
|
|
121
121
|
|
122
122
|
def set_user
|
123
123
|
if user
|
124
|
-
Process.euid = uid
|
125
124
|
Process.uid = uid
|
125
|
+
Process.euid = uid
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
@@ -211,31 +211,6 @@ module Mixlib
|
|
211
211
|
STDIN.sync = true if input
|
212
212
|
end
|
213
213
|
|
214
|
-
# When a new process is started with chef, it shares the file
|
215
|
-
# descriptors of the parent. We clean the file descriptors
|
216
|
-
# coming from the parent to prevent unintended locking if parent
|
217
|
-
# is killed.
|
218
|
-
# NOTE: After some discussions we've decided to iterate on file
|
219
|
-
# descriptors upto 256. We believe this is a reasonable upper
|
220
|
-
# limit in a chef environment. If we have issues in the future this
|
221
|
-
# number could be made to be configurable or updated based on
|
222
|
-
# the ulimit based on platform.
|
223
|
-
def clean_parent_file_descriptors
|
224
|
-
# Don't clean $stdin, $stdout, $stderr, process_status_pipe.
|
225
|
-
3.upto(256) do |n|
|
226
|
-
# We are checking the fd for error pipe before attempting to
|
227
|
-
# create a file because error pipe will auto close when we
|
228
|
-
# try to create a file since it's set to CLOEXEC.
|
229
|
-
if n != @process_status_pipe.last.to_i
|
230
|
-
begin
|
231
|
-
fd = File.for_fd(n)
|
232
|
-
fd.close if fd
|
233
|
-
rescue
|
234
|
-
end
|
235
|
-
end
|
236
|
-
end
|
237
|
-
end
|
238
|
-
|
239
214
|
def configure_parent_process_file_descriptors
|
240
215
|
# Close the sides of the pipes we don't care about
|
241
216
|
stdin_pipe.first.close
|
@@ -309,8 +284,6 @@ module Mixlib
|
|
309
284
|
|
310
285
|
configure_subprocess_file_descriptors
|
311
286
|
|
312
|
-
clean_parent_file_descriptors
|
313
|
-
|
314
287
|
set_group
|
315
288
|
set_user
|
316
289
|
set_environment
|
@@ -318,7 +291,7 @@ module Mixlib
|
|
318
291
|
set_cwd
|
319
292
|
|
320
293
|
begin
|
321
|
-
command.kind_of?(Array) ? exec(*command) : exec(command)
|
294
|
+
command.kind_of?(Array) ? exec(*command, :close_others=>true) : exec(command, :close_others=>true)
|
322
295
|
|
323
296
|
raise 'forty-two' # Should never get here
|
324
297
|
rescue Exception => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixlib-shellout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Opscode
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -51,15 +51,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.9.3
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - "
|
57
|
+
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: '0'
|
60
60
|
requirements: []
|
61
61
|
rubyforge_project:
|
62
|
-
rubygems_version: 2.
|
62
|
+
rubygems_version: 2.4.4
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Run external commands on Unix or Windows
|