[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
perl bug? weird ctrl-z behaviour when piping from tin through perl
Sometimes I pipe articles in tin(1) through a perl script that parses
the output, does something and pipes it into less; when I quit less
I'm back in tin and everything is fine.
However, when I press ctrl-z (happens more often than I'd think) the
terminal ends up in a strange state. The output is
Stopped. Type 'fg' to restart tin
but I have no shell:
entering "fg" doesn't take me back to tin. Killing the perl and/or
less processes doesn't help either, nor does pressing 'q' (as command
for less or tin).
A tin developer analysed the behaviour of tin for me:
before popen(), tin does (feed.c:feed_articles() ~ line 616)
and after pclose() (feed.c:feed_articles() ~ line 855)
SIGTSTP causes (signal.c:handle_suspend())
The developer claims that the double reset_shell_mode shouldn't hurt
and that this looks ok (I think so as well).
He reduced my test case to
and pressing ^Z, which works nicely, however piping through
perl -ne 'print $_;'|less
and pressing ^Z confuses perl. This looks like a perl problem.
Can someone shed more light on this?
Main Index |
Thread Index |