How can I handle SIGINT when using libjulia C API (in Python ctypes)?

After I initialize libjulia by calling jl_init_with_image, I found that libjulia takes over all SIGINT handlings. Is it correct? Is there any way for a host program (Python in my case) to handle the signals? I tried --handle-signals=no but it seems to have no effect.

Here is the sample program:

and a sample output is:

$ python
Please hit Ctrl-C
^CGot a KeyboardInterrupt
Base.Sys.BINDIR = /home/takafumi/julia/julia-1.0.0/bin
libjulia_path = /home/takafumi/julia/julia-1.0.0/bin/../lib/
calling jl_init_with_image(/home/takafumi/julia/julia-1.0.0/bin, /home/takafumi/julia/julia-1.0.0/lib/julia/
seems to work...
Please hit Ctrl-C
^Ctypeof(err) = InterruptException
9-element Array{Base.StackTraces.StackFrame,1}:
 process_events at libuv.jl:98 [inlined]
 wait() at event.jl:246
 wait(::Condition) at event.jl:46
 wait_readbyte(::Base.TTY, ::UInt8) at stream.jl:278
 #readuntil#477 at stream.jl:769 [inlined]
 #readuntil at none:0 [inlined]
 #readline#268(::Bool, ::Function, ::Base.TTY) at io.jl:370
 readline(::Base.TTY) at io.jl:370
 top-level scope at none:4

Please hit Ctrl-C
^C^C^C^C^C^CWARNING: Force throwing a SIGINT
fatal: error thrown and no exception handler available.
__read at /usr/lib/ (unknown line)
_IO_file_underflow at /usr/lib/ (unknown line)
_IO_default_uflow at /usr/lib/ (unknown line)
_IO_getline_info at /usr/lib/ (unknown line)
fgets at /usr/lib/ (unknown line)
unknown function (ip: 0x7faeeb58bb57)
PyOS_StdioReadline at /usr/lib/ (unknown line)
PyOS_Readline at /usr/lib/ (unknown line)
unknown function (ip: 0x7faeeb5ad014)
_PyMethodDef_RawFastCallKeywords at /usr/lib/ (unknown line)
_PyCFunction_FastCallKeywords at /usr/lib/ (unknown line)
_PyEval_EvalFrameDefault at /usr/lib/ (unknown line)
_PyFunction_FastCallKeywords at /usr/lib/ (unknown line)
_PyEval_EvalFrameDefault at /usr/lib/ (unknown line)
_PyEval_EvalCodeWithName at /usr/lib/ (unknown line)
PyEval_EvalCodeEx at /usr/lib/ (unknown line)
PyEval_EvalCode at /usr/lib/ (unknown line)
unknown function (ip: 0x7faeeb73176f)
PyRun_FileExFlags at /usr/lib/ (unknown line)
PyRun_SimpleFileExFlags at /usr/lib/ (unknown line)
unknown function (ip: 0x7faeeb736a8e)
_Py_UnixMain at /usr/lib/ (unknown line)
__libc_start_main at /usr/lib/ (unknown line)
_start at python (unknown line)
python  4.17s user 1.45s system 63% cpu 8.801 total

Note that the first Ctrl-C works because it was before initializing libjulia. The second Ctrl-C also works because I’m inside jl_eval_string. The last Ctrl-C (fast repeated types) does not trigger the normal SIGINT handling of Python (KeyboardInterrupt) but it seems it’s rather via the “force exit” path (WARNING: Force throwing a SIGINT) in julia:

Edit: I tried signal.pthread_sigmask(signal.SIG_UNBLOCK, [signal.SIGINT]) to unmask SIGINT but it didn’t work (= no KeyboardInterrupt with the last Ctrl-C). But it causes julia to ignore SIGINT as well.