google-code-export / omega

Automatically exported from code.google.com/p/omega
Other
2 stars 0 forks source link

parser does not detect EOF #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Run this (in *nix):

echo 1 | omega

You will see a never ending output of "prompt> prompt> ...".

Same happens when typing ^D (control-D) into the listener (several times).

Like other filter-like tools, omega should gracefully quit
in this case.

Original issue reported on code.google.com by ggr...@gmail.com on 13 Jun 2007 at 1:25

GoogleCodeExporter commented 9 years ago
The fix (when done) will assume that the posix module
is available.

Original comment by ggr...@gmail.com on 11 Dec 2007 at 4:51

GoogleCodeExporter commented 9 years ago
revision 50 implements this.

the patch checks whether the input is coming from a pipe
and if so, using the cheap method of interaction, without
readline, checking for ^D and pipe EOF.

Original comment by ggr...@gmail.com on 12 Dec 2007 at 10:52

Attachments:

GoogleCodeExporter commented 9 years ago
Now we get:

prompt> <stdin>: hGetChar: end of file
prompt> <stdin>: hGetChar: end of file
... ad infinitum ...

Original comment by ggr...@gmail.com on 9 Dec 2010 at 12:05