Re: [PATCH] histedit: fix dash exiting when receiving a signal interactively
Herbert Xu <[email protected]> Thu, 18 Sep 2025 11:20:25 +0800
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <[email protected]> |
Abdullah <[email protected]> wrote: > > + /* Got a signal while reading. */ > + if (el_len < 0 && errno == EINTR && pending_sig) { > + out2c('\r'); > + liw = el_wline(el); > + /* Don't lose the current line. > + * el_wpush() takes a L'\0' terminated string. > + * el_wline() gives us a string with N elements. > + * Simple solution: el_wpush() it wchar-by-wchar. > + */ > + wbuf[1] = L'\0'; > + wc = liw->buffer; > + while (wc < liw->lastchar) { > + wbuf[0] = *wc++; > + el_wpush(el, wbuf); > + } > + dotrap(); > + goto retry; > + } > + return 0; Can you please explain why this is necessary and why el_gets can't handle it? > - if (signo == SIGCHLD) > + if ( > + signo == SIGCHLD > +#if defined(WINCH) && !defined(SMALL) > + || signo == WINCH > +#endif Please use SIGWINCH consistently. Thanks, -- Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt