bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Interrupt handling in mail (was: Re: Inconsistency in attribute.c)


From: Sergey Poznyakoff
Subject: Interrupt handling in mail (was: Re: Inconsistency in attribute.c)
Date: Tue, 03 Jul 2001 15:07:59 +0300

Bonjour,

> Which seems to indicate readline-3.x, I do not think, in earlier then
> 4.x the bits to handle user signal handlers were in, libreadline
> would just take over.  Unless you rl_clear_signals() and do in

I have downgraded readline to version 2.0 (it is dated Aug-4-1994) :^)
The code for interrupt handling is almost unchanged since this
version, so it is also able to handle interrupts properly. The only
problem with it is that readline(NULL) crashes miserably, as it is
trying to do strlen(rl_prompt) without checking for NULL value.
Actually, I am not sure whether we should go into the trouble of
supporting it... What is your opinion?
The versions up from 2.1 seem to work quite well. What kind of
problems are you experiencing on your box?

By the way, the only reliable method to discover the version of the
library being used seems to be linking it against the program:

#include <readline.h>
int
main()
{
  printf("%s\n", rl_library_version);
}

If it compiles and runs, then it outputs the version. If it does not then
it is 2.0 :^).

It seems mail_print now handles interrupts properly, it simply calls
ml_got_interrupt() in its read-and-print loop. Use of longjmp would
raise lots of problems as it can occur e.g. after malloc'ing some
memory, in which case this chunk of memory would never be freed.

au revoir,
Sergey





reply via email to

[Prev in Thread] Current Thread [Next in Thread]