diff options
author | Jonathan Slenders <jonathan@slenders.be> | 2016-07-30 15:52:14 +0200 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2016-07-30 15:52:14 +0200 |
commit | b8c25314db52796b749d859468c11b61e9628386 (patch) | |
tree | c4a2a15dcd10e3cd7da4b24df26a07a56bc63c75 | |
parent | 4ef995693903804523908e4893ec569c2d57c9cc (diff) |
Added comment regarding ioctl call.
-rw-r--r-- | prompt_toolkit/terminal/vt100_output.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/prompt_toolkit/terminal/vt100_output.py b/prompt_toolkit/terminal/vt100_output.py index 830ccc2d..28f38cac 100644 --- a/prompt_toolkit/terminal/vt100_output.py +++ b/prompt_toolkit/terminal/vt100_output.py @@ -314,6 +314,9 @@ def _get_size(fileno): buf = array.array(b'h' if six.PY2 else u'h', [0, 0, 0, 0]) # Do TIOCGWINSZ (Get) + # Note: We should not pass 'True' as a fourth parameter to 'ioctl'. (True + # is the default.) This causes segmentation faults on some systems. + # See: https://github.com/jonathanslenders/python-prompt-toolkit/pull/364 fcntl.ioctl(fileno, termios.TIOCGWINSZ, buf) # Return rows, cols |