File: x

package info (click to toggle)
libexpect-perl 1.20-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 260 kB
  • ctags: 45
  • sloc: perl: 1,951; makefile: 38
file content (48 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- Expect.pm.old	2002-09-15 22:57:44.000000000 +0100
+++ Expect.pm	2002-09-15 22:58:15.000000000 +0100
@@ -1356,7 +1356,7 @@
       ${*$self}{exp_Exit} =3D $?;
       return ${*$self}{exp_Exit};
     }
-    sleep 1;			# Keep loop nice.
+    select undef, undef, undef, 0.01;
   }
   # Send it a term if it isn't dead.
   if (${*$self}{exp_Debug}) {
@@ -1377,7 +1377,7 @@
       ${*$self}{exp_Exit} =3D $?;
       return $?;
     }
-    sleep 1;
+    select undef, undef, undef, 0.01;
   }
   # Since this is a 'soft' close, sending it a -9 would be inappropriate.
   return undef;
@@ -1411,7 +1411,7 @@
       ${*$self}{exp_Exit} =3D $?;
       return ${*$self}{exp_Exit};
     }
-    sleep 1;			# Keep loop nice.
+    select undef, undef, undef, 0.01;
   }
   # Send it a term if it isn't dead.
   if (${*$self}{exp_Debug}) {
@@ -1432,7 +1432,7 @@
       ${*$self}{exp_Exit} =3D $?;
       return ${*$self}{exp_Exit};
     }
-    sleep 1;
+    select undef, undef, undef, 0.01;
   }
   kill KILL =3D> ${*$self}{exp_Pid};
   # wait 5 more seconds for it to die.
@@ -1449,7 +1449,7 @@
       ${*$self}{exp_Exit} =3D $?;
       return ${*$self}{exp_Exit};
     }
-    sleep 1;
+    select undef, undef, undef, 0.01;
   }
   warn "Pid ${*$self}{exp_Pid} of ${*$self}{exp_Pty_Handle} is HUNG.\r\n";
   ${*$self}{exp_Pid} =3D undef;