* rcp.exp (stop_rsh_daemon): Call "expect eof" to drain pty buffer
authorTom Yu <tlyu@mit.edu>
Wed, 24 Oct 2001 04:12:52 +0000 (04:12 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 24 Oct 2001 04:12:52 +0000 (04:12 +0000)
and avoid deadlock.

* rsh.exp (stop_rsh_daemon, rsh_test): Call "expect eof" to drain
pty buffer and avoid deadlock.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13837 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/dejagnu/krb-standalone/ChangeLog
src/tests/dejagnu/krb-standalone/rcp.exp
src/tests/dejagnu/krb-standalone/rsh.exp

index e34d13e61bc22148ea6be7c7bab4a349f68c0bc9..7eb71b303989c29c8d970a9a6afbcc14a5bbbc79 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-24  Tom Yu  <tlyu@mit.edu>
+
+       * rcp.exp (stop_rsh_daemon): Call "expect eof" to drain pty buffer
+       and avoid deadlock.
+
+       * rsh.exp (stop_rsh_daemon, rsh_test): Call "expect eof" to drain
+       pty buffer and avoid deadlock.
+
 2001-07-04  Ezra Peisach  <epeisach@mit.edu>
 
        * v4gssftp.exp, gssftp.exp: Test transfering a file > 1MB to
index 59125b78f1d2878c6dabd6cda2df5fa06390bd0f..0c6d4df893c8475e2e706f349d141c0bd2285989 100644 (file)
@@ -74,6 +74,7 @@ proc stop_rsh_daemon { } {
     if [info exists krshd_pid] {
        catch "close -i $krshd_spawn_id"
        catch "exec kill $krshd_pid"
+       catch "expect -i $krshd_spawn_id eof"
        catch "wait -i $krshd_spawn_id"
        unset krshd_pid
     }
index 0cb8304b40823405b078541ed8b2765366f08d9e..82f0ad3e496989873f0f0de52adb09c289407c9e 100644 (file)
@@ -59,6 +59,7 @@ proc stop_rsh_daemon { } {
     if [info exists krshd_pid] {
        catch "close -i $krshd_spawn_id"
        catch "exec kill $krshd_pid"
+       catch "expect -i $krshd_spawn_id eof"
        catch "wait -i $krshd_spawn_id"
        unset krshd_pid
     }
@@ -140,6 +141,7 @@ proc rsh_test { } {
        }
     }
 
+    catch "expect eof"
     if { $failed == "no" } {
        if ![check_exit_status $testname] {
            return