261060
diff -up expect-5.44.1.15/example/mkpasswd.orig expect-5.44.1.15/example/mkpasswd
261060
--- expect-5.44.1.15/example/mkpasswd.orig	2010-03-08 16:01:05.518378075 +0100
261060
+++ expect-5.44.1.15/example/mkpasswd	2010-03-08 16:01:27.408388162 +0100
261060
@@ -92,7 +92,14 @@ proc insert {pvar char} {
261060
 }
261060
 
261060
 proc rand {m} {
261060
-    expr {int($m*rand())}
261060
+    set device /dev/urandom            ;# /dev/random can block
261060
+    set fileId [open $device r]
261060
+    binary scan [read $fileId 4] i1 number
261060
+    set clipped [expr $number % $m]
261060
+#    puts "number is $number"
261060
+#    puts "clipped is $clipped"
261060
+    close $fileId
261060
+    return $clipped
261060
 }
261060
 
261060
 # choose left or right starting hand