Permalink
Browse files

Respect SIGCHLD raised from other children of the same process

  • Loading branch information...
1 parent ac94b46 commit 61ed40ea7f5889defdf20dd857e1591eaad2b550 @tnm committed Jul 12, 2012
Showing with 2 additions and 4 deletions.
  1. +1 −3 lib/pygments/popen.rb
  2. +1 −1 lib/pygments/version.rb
View
@@ -1,5 +1,4 @@
# coding: utf-8
-
require 'posix/spawn'
require 'yajl'
@@ -39,9 +38,8 @@ def start(pygments_path = File.expand_path('../../../vendor/pygments-main/', __F
# if an ECHILD (no children) is set by waitpid(), don't die horribly;
# still set the @pid to nil.
begin
- @pid = nil if Process.waitpid == @pid
+ @pid = nil if @pid && Process.waitpid(@pid, Process::WNOHANG) == @pid
rescue Errno::ECHILD
- @pid = nil
end
end
end
View
@@ -1,3 +1,3 @@
module Pygments
- VERSION = '0.3.0'
+ VERSION = '0.2.15'
end

0 comments on commit 61ed40e

Please sign in to comment.