Ticket #31 (closed task: fixed)
Crash when stdin is a terminal but stdout is not.
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Version: | 0.3 | Keywords: | 03627546 |
| Cc: |
Description
Haskeline seems to perform wrong operations when the standard output is not a terminal. A small test program is attached. Here are the result it produces when using a terminal as standard output ("a" is entered manually):
[glehmann@gbook haskeline]$ runhaskell test.hs getLine: a a haskeline: a a
which seem to be the right behavior. When using a different standard output, the program crash:
[glehmann@gbook haskeline]$ runhaskell test.hs | tee foo getLine: a a test.hs: getTerminalAttributes: illegal operation (Inappropriate ioctl for device)
and when using a program a standard input, the behavior is the same as getLine, as documented:
[glehmann@gbook haskeline]$ yes | runhaskell test.hs | tee foo getLine: y y
This problem has been found in a darcs test by Eric Kow - see http://bugs.darcs.net/issue1050
Change History
Note: See
TracTickets for help on using
tickets.
