proc execute_fileevent: change exec ps syntax to work both on Linux and MacOS

This commit is contained in:
stefan schippers 2023-09-16 01:04:29 +02:00
parent 3f299589d1
commit 216d2a1297
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ proc execute_fileevent {id} {
# asynchronous close. We lose exit status and stderr though, but
# avoid the program to freeze waiting for process to exit.
set lastproc [lindex [pid $execute(pipe,$id)] end]
set ps_status [exec ps -o s= [pid $execute(pipe,$id)]]
set ps_status [exec ps -o state= -p $lastproc]
set finished [regexp Z $ps_status] ;# if zombie consider process to be finished.
} else {
set eof [eof $execute(pipe,$id)]