浏览代码

fixed issue #727

Nicolas Cannasse 13 年之前
父节点
当前提交
0b109b8be8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      main.ml

+ 1 - 1
main.ml

@@ -1014,7 +1014,7 @@ try
 				the process from blocking when the pipe is full
 			*)
 			let is_process_running() =
-				fst (Unix.waitpid [Unix.WNOHANG] (-1)) = 0
+				try fst (Unix.waitpid [Unix.WNOHANG] (-1)) = 0 with Unix.Unix_error (Unix.ECHILD,_,_) -> false
 			in
 			let rec loop ins =
 				let (ch,_,_), timeout = (try Unix.select ins [] [] 0.02, true with _ -> ([],[],[]),false) in