aboutsummaryrefslogtreecommitdiff
path: root/bp.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-15 18:45:33 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-15 18:45:33 -0800
commit253e81e1d974c54d1729a14cfa6b17030d5d7011 (patch)
tree629dffea94454a0fe54643755dbca0bf74a2db99 /bp.c
parentf5881a8c963eaf6b5ad72c6cfaef7b35e7f5edd2 (diff)
More correct behavior for Ctrl-c
Diffstat (limited to 'bp.c')
-rw-r--r--bp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bp.c b/bp.c
index 4627ed7..ab48430 100644
--- a/bp.c
+++ b/bp.c
@@ -263,8 +263,7 @@ static int inplace_modify_file(def_t *defs, file_t *f, pat_t *pattern)
confirm_replacements(f, m, &confirm_file);
if (!in_use_tempfile) { // signal interrupted, so abort
fclose(inplace_file);
- inplace_file = NULL;
- break;
+ exit(1);
}
print_match(inplace_file, &pr, m);
}