summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2015-09-21 11:43:54 -0700
committerJeff Quast <contact@jeffquast.com>2015-09-21 11:43:54 -0700
commit8c97bc616f24da4b006147d3cb5d4b9a5431c964 (patch)
tree6067335ef79dedadc1180ed7d43c7f0d99ea8b7d
parentf5993888e092bd8cecc98ac9558700d4fe8624cf (diff)
downloadpexpect-timing-issue-remove.tar.gz
Remove 'add sleep before isalive()' recommendationtiming-issue-remove
This is no longer a problem, we've added p.isalive() assertions to a great majority of our test cases across a great many platforms of varying speeds that contradicts this recommendation.
-rw-r--r--doc/commonissues.rst14
1 files changed, 0 insertions, 14 deletions
diff --git a/doc/commonissues.rst b/doc/commonissues.rst
index 26d0e2b..d3aa9d0 100644
--- a/doc/commonissues.rst
+++ b/doc/commonissues.rst
@@ -49,20 +49,6 @@ off::
child = pexpect.spawn ("ssh user@example.com")
child.delaybeforesend = 0
-Timing issue with isalive()
----------------------------
-
-Reading the state of :meth:`~pexpect.spawn.isalive` immediately after a child
-exits may sometimes return 1. This is a race condition. The child has closed its
-file descriptor, but has not yet fully exited before Pexpect's
-:meth:`~pexpect.spawn.isalive` executes. Addings a slight delay before the
-:meth:`~pexpect.spawn.isalive` call will help. For example::
-
- child = pexpect.spawn('ls')
- child.expect(pexpect.EOF)
- time.sleep(0.1)
- print child.isalive()
-
Truncated output just before child exits
----------------------------------------