Accept a signal (e.g., SIGUSR1
) which asks Tux Paint to shut down gracefully, and save work, no questions asked.
Motivation: Flavio Airundo uses Tux Paint in labs full of Linux systems with young children who don't necessarily know how, or remember to, save their work at the end. He currently utilizes kill
via SSH to shut down Tux Paint.
A normal SIGTERM
will be caught by Tux Paint, and bring up a prompt (in the UI) to ask whether or not to quit. If --autosave
is used, Tux Paint will not bother asking about saving upon quit, if the current drawing has not been saved yet. If --saveover
or --saveovernew
is used, Tux Paint will not bother asking about overwriting the existing image, if it had been saved before, but modified since.
It's probably too much to ask users who might want this feature to always require a "save over" option be chosen, so perhaps SIGUSR1
could be for always saving a new file (avoid upsetting loss of data) and SIGUSR2
to always save over the existing (avoid extra files). "Auto save" should be implied, however; the administrator could just use SIGKILL
(kill -9
) if they didn't care.
Implemented in https://sourceforge.net/p/tuxpaint/tuxpaint/ci/99b566ae2697136e3d4a9cfccc466e2a5cd7f3d6/