summaryrefslogtreecommitdiff
path: root/tests/support/util.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/support/util.tcl')
-rw-r--r--tests/support/util.tcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/support/util.tcl b/tests/support/util.tcl
index 51a8420a3..a7332d29c 100644
--- a/tests/support/util.tcl
+++ b/tests/support/util.tcl
@@ -627,6 +627,14 @@ proc get_child_pid {idx} {
return $child_pid
}
+proc process_is_alive pid {
+ if {[catch {exec ps -p $pid} err]} {
+ return 0
+ } else {
+ return 1
+ }
+}
+
proc cmdrstat {cmd r} {
if {[regexp "\r\ncmdstat_$cmd:(.*?)\r\n" [$r info commandstats] _ value]} {
set _ $value