How can I stop sagemath program without quitting sage session?
Hello. First of all, I think it is good to describe how I use SageMath before asking the question.
I installed SageMath in my laptop using Ubuntu 16.04. It is installed in directory "~/sage". I usually run SageMath in terminal. That is, I follow the following steps to run SageMath.
- Open the terminal (It is the basic terminal from Ubuntu 16.04).
- Go to the directory where SageMath is installed by typing "cd sage".
- Type "./sage". Then, sage session begins.
In sage session, I usually load a sage file which I already wrote and run it to check the result. But sometimes, a program does not seem to finish, since computation takes a lot of time. Then, I would like to finish the program which I am running now, but without going out of sage session, since otherwise, I should follow 3 steps above again. However, I could not find how to do it, yet.
Can anybody teach me how to do it?
To cancel the current calculation, hit control-c. Does that do what you want?
Thank you! It works! I did not know that there is such a simple solution.
Well, sometimes
control-c
in a terminal terminates the sage session as well (with "core dumped"). In my experience, interrupting the Jupyter kernel has not this drawback.@eric_g: this usually indicates a bug: a core dump should not happen. If it is repeatable, or at least somewhat repeatable, you should report the issue so it can be fixed.