Skip to content

Commit 973a1b5

Browse files
committed
Adding a Process::WNOHANG to the waitpid2 from popen4
1 parent d486a5a commit 973a1b5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

chef/lib/chef/mixin/command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def popen4(cmd, args={}, &b)
278278
if b
279279
begin
280280
b[cid, *pi]
281-
Process.waitpid2(cid).last
281+
Process.waitpid2(cid, Process::WNOHANG).last
282282
ensure
283283
pi.each{|fd| fd.close unless fd.closed?}
284284
end

example-repository/cookbooks/CHEF-56/recipes/default.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# limitations under the License.
1818
#
1919

20-
service "vncserver" do
21-
supports :status => true, :reload => true
22-
action [ :enable, :start, :restart, :stop, :disable ]
20+
service "gpm" do
21+
supports :status => true, :restart => true
22+
action [ :restart, :stop, :disable, :start, :enable ]
2323
end

0 commit comments

Comments
 (0)