kittens: Don't fail on systems that return invalid values for SC_IOV_MAX. Fixes #558
This commit is contained in:
parent
be28e7bf46
commit
70352ca722
1 changed files with 1 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ def __init__(self, input_fd=None, output_fd=None,
|
|||
self.read_buf = ''
|
||||
self.decoder = codecs.getincrementaldecoder('utf-8')('ignore')
|
||||
try:
|
||||
self.iov_limit = os.sysconf('SC_IOV_MAX') - 1
|
||||
self.iov_limit = max(os.sysconf('SC_IOV_MAX') - 1, 255)
|
||||
except Exception:
|
||||
self.iov_limit = 255
|
||||
self.parse_input_from_terminal = partial(parse_input_from_terminal, self._on_text, self._on_dcs, self._on_csi, self._on_osc, self._on_pm, self._on_apc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue