From 4f4872fa7bee2a8f17a1039bef499e801b0ca7cf Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 23 Oct 2023 10:33:08 +0200 Subject: [PATCH] execute_fileevent: use exit status instead of stderr data in status report --- src/xschem.tcl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xschem.tcl b/src/xschem.tcl index 1275ded5..70dbb963 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -254,7 +254,11 @@ proc execute_fileevent {id} { if {"CHILDSTATUS" == [lindex $errorCode 0]} { set exit_status [lindex $errorCode 2] } - if {$report} {viewdata "Failed: $execute(cmd,$id)\nstderr:\n$err\ndata:\n$execute(data,$id)"} + if {$exit_status != 0} { + if {$report} {viewdata "Failed: $execute(cmd,$id)\nstderr:\n$err\ndata:\n$execute(data,$id)"} + } else { + if {$report} {viewdata "Completed: $execute(cmd,$id)\nstderr:\n$err\ndata:\n$execute(data,$id)"} + } } else { if {$report} {viewdata "Completed: $execute(cmd,$id)\ndata:\n$execute(data,$id)"} }