aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/tip.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/tip.tcl b/examples/tip.tcl
index 2770dcb..3de25e3 100755
--- a/examples/tip.tcl
+++ b/examples/tip.tcl
@@ -82,6 +82,11 @@ try {
return 1
}
+if {[$f lock] == 0} {
+ puts "Device is in use: $device"
+ return 1
+}
+
try {
$f tty {*}$settings
} on error msg {