<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/Shell/ScriptInterpreter/Python/eof.test, branch users/meinersbur/flang_runtime_split-headers</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb/Python] Fix the infinitely looping Python prompt bug</title>
<updated>2020-06-16T18:05:19+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2020-06-16T18:02:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4dd3dfe8e3266459d855008af78d611071ff99e2'/>
<id>4dd3dfe8e3266459d855008af78d611071ff99e2</id>
<content type='text'>
Executing commands below will get you bombarded by a wall of Python
command prompts (&gt;&gt;&gt; ).

$ echo 'foo' | ./bin/lldb -o script
$ cat /tmp/script
script
print("foo")
$ lldb --source /tmp/script

The issue is that our custom input reader doesn't handle EOF. According
to the Python documentation, file.readline always includes a trailing
newline character unless the file ends with an incomplete line. An empty
string signals EOF. This patch raises an EOFError when that happens.

[1] https://docs.python.org/2/library/stdtypes.html#file.readline

Differential revision: https://reviews.llvm.org/D81898
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Executing commands below will get you bombarded by a wall of Python
command prompts (&gt;&gt;&gt; ).

$ echo 'foo' | ./bin/lldb -o script
$ cat /tmp/script
script
print("foo")
$ lldb --source /tmp/script

The issue is that our custom input reader doesn't handle EOF. According
to the Python documentation, file.readline always includes a trailing
newline character unless the file ends with an incomplete line. An empty
string signals EOF. This patch raises an EOFError when that happens.

[1] https://docs.python.org/2/library/stdtypes.html#file.readline

Differential revision: https://reviews.llvm.org/D81898
</pre>
</div>
</content>
</entry>
</feed>
