diff options
| author | Thomas Kluyver <takowl@gmail.com> | 2015-09-22 10:07:42 +0100 |
|---|---|---|
| committer | Thomas Kluyver <takowl@gmail.com> | 2015-09-22 10:07:42 +0100 |
| commit | c2ff3f19e08ff5f74f2ea95354d79b46feed321c (patch) | |
| tree | c363db7e66b12c23b03423f674f78838be4b4053 /doc | |
| parent | 5523026eeeb477965de55e59f26eb3c50fb11775 (diff) | |
| parent | 8c97bc616f24da4b006147d3cb5d4b9a5431c964 (diff) | |
| download | pexpect-c2ff3f19e08ff5f74f2ea95354d79b46feed321c.tar.gz | |
Merge pull request #260 from pexpect/timing-issue-remove
Remove 'add sleep before isalive()' recommendation
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/commonissues.rst | 14 |
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 ---------------------------------------- |
