You can do it with kill -15 PID And, this (requires OSProcess): makeStopHook "Answers the process that hooks to the OS signal that makes this worker to shutdown when the VM process receives a TERM signal from the OS." ^ [|semaphore| semaphore := OSProcess accessor forwardSigTerm. semaphore wait. self onTerminationSignal] forkAt: Processor systemBackgroundPriority named: 'Image TERMâ onTerminationSignal "The process for the VM of this image has received a TERM signal from the OS. React accordingly" self log: 'That''s all folks. This worker is shutting down. Bye bye...' level:#messages. OSProcess accessor restoreSigTerm. SmalltalkImage current snapshot: false andQuit: true.
On Feb 10, 2015, at 4:58 PM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Is there a way I can externally signal a running pharo-vm in order to request a shutdown equivalent to clicking on the close icon?
I'd like to externally manage the start/stop of a Pharo image, but because the image can be used during development, I'd like to provide the user with a confirmation dialog instead of simply killing the process.
Regards!
Esteban A. Maringolo