We don't bite newbies here... much | |
PerlMonks |
Re: pmchat-2by jakobi (Pilgrim) |
on Sep 29, 2009 at 13:10 UTC ( [id://798116]=note: print w/replies, xml ) | Need Help?? |
Thanx to anonymous for the pointer. Please use the earlier Patch for the time being. (partial line lost, as noted below; so it's patch is merely a valid example for interrupting linked code with POSIX::sigaction, and annoying the user, but not for sane interrupted ReadLine use
It might be another improvement to also comment-out the undef of the handler and move the setting of the handler to just below the use Term::Readline; as SIGALRM shouldn't happen without us using alarm(). Update 1: with the change of the Alarm, I cannot obtain the partial input line (noticed when reducing the timeout). While there's a tantalizing rl_set_keyboard_input_timeout(int usec) for Gnu ReadLine, it's probably not worth the effort, as the version of the patch in the first post works well enough. KISS wins, I guess. Please drop me a line if you've a trick to try and get the partial line buffer. Thanx.
In Section
Code Catacombs
|
|