On Fri, 17 Feb 2017 at 19:41:00 +0100, Michael Hirmke wrote: > A much better approach is to write a script or program listening for the > according signals "PrepareForSleep" and "PrepareForShutdown" on the dbus > interface "org.freedesktop.login1".
This is the thing to do. It allows your program to delay suspend until it is ready for suspend to happen, or prevent suspend altogether. For instance, Telepathy delays suspend so it can try to take instant messaging connections offline first: https://cgit.freedesktop.org/telepathy/telepathy-mission-control/tree/src/connectivity-monitor.c S _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel