Browse Source

fixed issue #727

Nicolas Cannasse 13 years ago
parent
commit
0b109b8be8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main.ml

+ 1 - 1
main.ml

@@ -1014,7 +1014,7 @@ try
 				the process from blocking when the pipe is full
 				the process from blocking when the pipe is full
 			*)
 			*)
 			let is_process_running() =
 			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
 			in
 			let rec loop ins =
 			let rec loop ins =
 				let (ch,_,_), timeout = (try Unix.select ins [] [] 0.02, true with _ -> ([],[],[]),false) in
 				let (ch,_,_), timeout = (try Unix.select ins [] [] 0.02, true with _ -> ([],[],[]),false) in