[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54444] Octave CLI doesn't terminate at sigter
[Octave-bug-tracker] [bug #54444] Octave CLI doesn't terminate at sigterm until <ENTER> pressed at prompt
Fri, 3 Jan 2020 23:30:33 -0500 (EST)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 OPR/65.0.3467.78
Follow-up Comment #7, bug #54444 (project octave):
I got hit by this, too, when upgrading Octave Online to version 5.1.
Previously, I could send SIGTERM to the Octave process, and it would
gracefully exit, no matter what state it was in. Now, sending SIGTERM has no
effect until the process gets some other kind of interaction.
I think this change is a bug in Octave, because the convention of SIGTERM is
that the process promptly begins a graceful shutdown procedure. If the
process does not exit on SIGTERM after some amount of time, then the only
other option is to send SIGKILL to the process. **SIGTERM-wait-SIGKILL is
expected to work regardless of the identity of the process**. Since Octave
does not do anything when receiving a SIGTERM, it forces agents to send
SIGKILL, which doesn't allow Octave to perform any cleanup logic.
As a workaround, for the purposes of terminating an Octave process, I've
changed the logic to first execute "exit" in the process, and then send
SIGKILL after 10 seconds if the process hasn't gracefully exited. This only
works because I know I have an Octave process.
Reply to this item at:
Message sent via Savannah
|[Prev in Thread]
||[Next in Thread]|
- [Octave-bug-tracker] [bug #54444] Octave CLI doesn't terminate at sigterm until <ENTER> pressed at prompt,