Unverified Commit 01577960 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

nixos/emacs: make systemd report clean exit status when stopping (#397916)

parents d4a21af6 8f87b512
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -73,7 +73,8 @@ in
        serviceConfig = {
          Type = "notify";
          ExecStart = "${pkgs.runtimeShell} -c 'source ${config.system.build.setEnvironment}; exec ${cfg.package}/bin/emacs --fg-daemon'";
          ExecStop = "${cfg.package}/bin/emacsclient --eval (kill-emacs)";
          # Emacs exits with exit code 15 (SIGTERM), when stopped by systemd.
          SuccessExitStatus = 15;
          Restart = "always";
        };