From acbe76329c82251a008979e31b273df554fe234c Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 7 Nov 2023 18:10:33 +0100 Subject: [PATCH] execute_fileevent: polling for processes that do close stdout --- src/xschem.tcl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xschem.tcl b/src/xschem.tcl index 8933bcd5..82bb10eb 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -242,6 +242,12 @@ proc execute_fileevent {id} { set lastproc [lindex [pid $execute(pipe,$id)] end] set ps_status [exec ps -o state= -p $lastproc] set finished [regexp Z $ps_status] ;# if zombie consider process to be finished. + if { $eof && !$finished} { + after 2000 "execute_fileevent $id" + fileevent $execute(pipe,$id) readable "" + # puts "rescheduling $id" + return + } } else { set eof [eof $execute(pipe,$id)] set finished 1