chiark / gitweb /
test: Provide first cut of invoke script
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 10 Oct 2019 16:30:27 +0000 (17:30 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Oct 2019 22:29:26 +0000 (23:29 +0100)
This is going to be reorganised and improved a lot.  Right now it
doesn't do much and doesn't exit.  If ^C'd it leaks the secnet
processes.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
test/invoke [new file with mode: 0755]

diff --git a/test/invoke b/test/invoke
new file mode 100755 (executable)
index 0000000..4795075
--- /dev/null
@@ -0,0 +1,15 @@
+#! /usr/bin/tclsh
+
+package require Tclx
+
+proc spawn-secnet {which} {
+    upvar #0 pids($which) pid
+    set argl [list ./secnet -dvnc test-example/$which.conf]
+    set pid [fork]
+    if {!$pid} {
+       execl really $argl
+    }
+}
+
+spawn-secnet inside
+spawn-secnet outside