Introduction
Introduction Statistics Contact Development Disclaimer Help
ed: Don't undo commands in sigint - sbase - suckless unix tools
git clone git://git.suckless.org/sbase
Log
Files
Refs
README
LICENSE
---
commit 6a557314b97a256f21a9964a6fb47f7b08427455
parent bbdd7bedc464fb2a4c39c6afe40e79c4e5071e15
Author: Roberto E. Vargas Caballero <[email protected]>
Date: Thu, 28 Dec 2023 17:26:50 +0100
ed: Don't undo commands in sigint
If newcmd is 0 then error() undo all the modifications
that happened since the last command, but this is not
what POSIX mandates:
SIGINT The ed utility shall interrupt its current activity, write the
string "?\n" to standard output, and return to command mode
(see the EXTENDED DESCRIPTION section).
Diffstat:
M ed.c | 1 +
1 file changed, 1 insertion(+), 0 deletions(-)
---
diff --git a/ed.c b/ed.c
@@ -740,6 +740,7 @@ chksignals(void)
if (intr) {
intr = 0;
+ newcmd = 1;
clearerr(stdin);
error("Interrupt");
}
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.