summaryrefslogtreecommitdiff
path: root/zen/shutdown.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2019-02-13 21:05:15 +0000
committerDaniel Wilhelm <shieldwed@outlook.com>2019-02-13 21:05:15 +0000
commit2e618740c10a6dc7f5a8ee031a196b4ac95b1294 (patch)
tree475a67b0b138f2b1cd5f02eaab8e413f7eee62c6 /zen/shutdown.cpp
parentMerge branch '10.8' into 'master' (diff)
parent10.9 (diff)
downloadFreeFileSync-2e618740c10a6dc7f5a8ee031a196b4ac95b1294.tar.gz
FreeFileSync-2e618740c10a6dc7f5a8ee031a196b4ac95b1294.tar.bz2
FreeFileSync-2e618740c10a6dc7f5a8ee031a196b4ac95b1294.zip
Merge branch '10.9' into 'master'10.9
10.9 See merge request opensource-tracking/FreeFileSync!6
Diffstat (limited to 'zen/shutdown.cpp')
-rw-r--r--[-rwxr-xr-x]zen/shutdown.cpp34
1 files changed, 7 insertions, 27 deletions
diff --git a/zen/shutdown.cpp b/zen/shutdown.cpp
index a25e9c64..f09c4d07 100755..100644
--- a/zen/shutdown.cpp
+++ b/zen/shutdown.cpp
@@ -40,30 +40,10 @@ void zen::terminateProcess(int exitCode)
}
-/*
-Command line alternatives:
-
-#ifdef ZEN_WIN
-#ifdef ZEN_WIN_VISTA_AND_LATER
- Shut down: shutdown /s /t 60
- Sleep: rundll32.exe powrprof.dll,SetSuspendState Sleep
- Log off: shutdown /l
-#else //XP
- Shut down: shutdown -s -t 60
- Standby: rundll32.exe powrprof.dll,SetSuspendState //this triggers standby OR hibernate, depending on whether hibernate setting is active! no suspend on XP?
- Log off: shutdown -l
-#endif
-
-#elif defined ZEN_LINUX
- Shut down: systemctl poweroff //alternative requiring admin: sudo shutdown -h 1
- Sleep: systemctl suspend //alternative requiring admin: sudo pm-suspend
- Log off: gnome-session-quit --no-prompt
- //alternative requiring admin: sudo killall Xorg
- //alternative without admin: dbus-send --session --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1
-
-#elif defined ZEN_MAC
- Shut down: osascript -e 'tell application "System Events" to shut down'
- Sleep: osascript -e 'tell application "System Events" to sleep'
- Log off: osascript -e 'tell application "System Events" to log out'
-#endif
-*/
+//Command line alternatives:
+ //Shut down: systemctl poweroff //alternative requiring admin: sudo shutdown -h 1
+ //Sleep: systemctl suspend //alternative requiring admin: sudo pm-suspend
+ //Log off: gnome-session-quit --no-prompt
+ // alternative requiring admin: sudo killall Xorg
+ // alternative without admin: dbus-send --session --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1
+
bgstack15