tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: varargs bug in libedit
Christos Zoulas <christos%zoulas.com@localhost> wrote:
> On Nov 3, 6:21pm, brooks%freebsd.org@localhost (Brooks Davis) wrote:
> -- Subject: Re: varargs bug in libedit
>
> | The documentation for EL_SIGNAL is:
> |
> | EL_SIGNAL, int flag
> | If flag is non-zero, editline will install its own signal
> | handler for the following signals when reading command input:
> | SIGCONT, SIGHUP, SIGINT, SIGQUIT, SIGSTOP, SIGTERM, SIGTSTP,
> | and SIGWINCH. Otherwise, the current signal handlers will be
> | used.
> |
> | It provides no way to retrieve the previous value. el_wget does read
> | the value as an int so if you passed &x it wouldn't work in any
> | sensible way.
> |
> | As you say, this isn't a good API, but it's what's documented and
> | implemented.
>
> In editline(3) there are two sections for EL_SIGNAL:
[...]
> The text for that is wrong since the code does:
It's obviously an unedited copy-and-paste.
> el.c:
> case EL_SIGNAL:
> *va_arg(ap, int *) = (el->el_flags & HANDLE_SIGNALS);
> rv = 0;
> break;
Exactly.
-uwe
Home |
Main Index |
Thread Index |
Old Index