Skip to content

Commit

Permalink
Support kernel stop request via octave SIGINT
Browse files Browse the repository at this point in the history
When no cell is running the SIGINT causes xeus to stop see
jupyter-xeus/xeus#272

Close: #25
  • Loading branch information
rapgenic committed Feb 6, 2021
1 parent bf8d13e commit fbd52ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xoctave_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <octave/graphics-handle.h>
#include <octave/graphics-toolkit.h>
#include <octave/graphics.h>
#include <octave/interpreter.h>
#include <octave/lo-array-errwarn.h>
#include <octave/oct-stream.h>
#include <octave/ov.h>
Expand Down Expand Up @@ -184,12 +185,14 @@ nl::json xoctave_interpreter::execute_request_impl(int execution_counter,
}

// Update the figure if present
octave::feval("drawnow");
interpreter.feval("drawnow");

return result;
}

void xoctave_interpreter::configure_impl() {
octave::install_signal_handlers();

interpreter.read_init_files(true);

interpreter.execute();
Expand Down

0 comments on commit fbd52ea

Please sign in to comment.