[issue1848] util.py should not abort upon EINVAL coming from TIOCGWINSZ
Fabrice Bauzac
bugs at mercurial.selenic.com
Wed Sep 30 20:15:50 UTC 2009
New submission from Fabrice Bauzac <fabrice.bauzac at wanadoo.fr>:
Hello folks,
I have found a simple bug that should be easy to fix.
On SunOS 5.10 with Mercurial 1.3.1, hg churn aborts when in a dumb terminal
(such as the default Emacs which does not set COLUMNS):
$ hg churn -f %H -s -c
abort: Invalid argument
$
The problem does not appear within a regular xterm.
I have tracked it down with truss and then pdb; the problem comes from
util.py's termwidth() which does not ignore EINVAL errors from ioctl TIOCGWINSZ.
More information can be found by googling EINVAL TIOCGWINSZ.
I know next to nothing about Python, but basically the abort disappears when
I add something like this:
except IOError:
pass
You will probably be more fluent in Python than I, and pass only if it is
really EINVAL.
Thank You!
----------
messages: 10605
nosy: noon
priority: bug
status: unread
title: util.py should not abort upon EINVAL coming from TIOCGWINSZ
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1848>
____________________________________________________
More information about the Mercurial-devel
mailing list