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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 021c7f8efea2d6d11f349b4a1728d3039567b191
4
- data.tar.gz: b9d6684c7b751462d6e4c2cea479f39474e3ee6d
3
+ metadata.gz: 1c5438feb4cca570fca5c9a9e1566ae6df1696d7
4
+ data.tar.gz: 42219e3a8e1a6300d72aeb63924dab765bbc5f0b
5
5
  SHA512:
6
- metadata.gz: e4a1e30bb080f4bad1697480360acc76b852a32d46d1f8e350e2ce1a0c9024734a5f3ce0377c56ad5a72207084410bcb32eaa1477bb25e7e1ea51f4a1e840e24
7
- data.tar.gz: 674076ca9e875c2b2b55d604f6ce3279c99e87014002429e51e1d1eeaac245947dbbbddd3811d32df5ca17e97910687ffaed91f9de7e41950b961be7cfcc27dd
6
+ metadata.gz: 31a81beb7022501bff7f57ff17eb91f97fc472f1b86199260d06910b8d1a05d68ac04d4908da39b7ecf5b8170f79402f0702a21d06ac044f4ae11b340a7545f6
7
+ data.tar.gz: 393c9b543d50e6c03f00b478a4903ea42cb4edb9fb9e93a9eabfbef9e2a541a837403ea77dff1d6dda8808dd64a1e0a5ce71545e551ed158b17d4fe85dedde91
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class ShellOut
3
- VERSION = "1.6.0.rc.0"
3
+ VERSION = "1.6.1"
4
4
  end
5
5
  end
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.0.rc.0
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-08-08 00:00:00.000000000 Z
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: '0'
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: 1.3.1
59
+ version: '0'
60
60
  requirements: []
61
61
  rubyforge_project:
62
- rubygems_version: 2.2.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