diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-11-26 13:10:28 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-11-26 13:10:28 +0100 |
commit | 3ef66cd23a81ae809bee8c27c0d65c3699be5c66 (patch) | |
tree | 416ff94ac006e345aa50d49847368350adb84656 /src | |
parent | b653fb9ccf2805f98b9777baec9cd4908f03bb3d (diff) |
nix repl: Reset the terminal on exceptional exits
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/repl.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 22a57de60..2649eb0bd 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -279,6 +279,7 @@ bool NixRepl::getLine(string & input, const std::string &prompt) }; setupSignals(); + Finally resetTerminal([&]() { rl_deprep_terminal(); }); char * s = readline(prompt.c_str()); Finally doFree([&]() { free(s); }); restoreSignals(); |