aboutsummaryrefslogtreecommitdiff
path: root/todo.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 04:15:30 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 04:15:30 -0500
commitf1dbec16531cd3d5f0b9124accedb8cb8e49dea3 (patch)
tree0c1705cb46d274dff19f4cc3968c149d7c08c5c3 /todo.org
parentc60b6962341293c50139646367ce567dc6cf200b (diff)
downloaddotemacs-f1dbec16531cd3d5f0b9124accedb8cb8e49dea3.tar.gz
dotemacs-f1dbec16531cd3d5f0b9124accedb8cb8e49dea3.zip
fix(system-commands): make Emacs restart and destructive confirms defensive
Restart-Emacs scheduled an unconditional kill-emacs one second after firing the systemctl restart. If the service was missing or the restart failed, the session still got killed with nothing to replace it. Restart now guards on (daemonp) and a present emacs.service before doing anything, and drops the separate kill-emacs entirely — systemctl restart cycles the daemon itself, so a failed restart leaves the current Emacs alive. Added cj/system-cmd--emacs-service-available-p (systemctl --user cat) for the guard. Shutdown and reboot now use a strong yes-or-no-p confirm instead of the quick (Y/n) read-char, where RET or space counted as yes — a stray Enter at the prompt could power off the machine. Logout and suspend keep the quick confirm since they are recoverable. The confirm tier rides on a property set by cj/defsystem-command. Tests cover service detection, both restart guards, and the strong-confirm accept/decline paths with the system primitives stubbed.
Diffstat (limited to 'todo.org')
0 files changed, 0 insertions, 0 deletions