diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-06 18:35:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-06 18:35:48 -0700 |
commit | c2e0ec801502ae26dae3dfdd035ff10436cffedd (patch) | |
tree | c27e5fd60688f16939d98d331fa4bbe0d2a0303a /eval.c | |
parent | 59aa1488ac6deec474dc5287d4866223e1bcd005 (diff) | |
download | txr-c2e0ec801502ae26dae3dfdd035ff10436cffedd.tar.gz txr-c2e0ec801502ae26dae3dfdd035ff10436cffedd.tar.bz2 txr-c2e0ec801502ae26dae3dfdd035ff10436cffedd.zip |
Allow evaluation from repl to be interrupted.
* eval.c (do_eval): Check for pending signals.
* parser.c (repl_intr): New static function.
(repl): Set up signal handler for SIGINT around REPL.
* signal.h (sig_deferred): declared.
(sig_check_fast): New inline function/macro.
A bit of a rearrangement here.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -955,6 +955,7 @@ static val do_eval(val form, val env, val ctx_form, debug_enter; debug_check(consp(form) ? form : ctx_form, env, nil, nil, nil, nil); + sig_check_fast(); if (nilp(form)) { debug_return (nil); |