Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use /usr/bin/caffeinate to disable power management on macOS #3284

Merged
merged 2 commits into from Sep 18, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/src/main/java/bisq/core/app/OSXStandbyModeDisabler.java
Expand Up @@ -15,6 +15,8 @@ public void doIt() {
long pid = ProcessHandle.current().pid();
try {
String[] params = {"/usr/bin/caffeinate", "-w", "" + pid};

// we only start the process. caffeinate blocks until we exit.
new ProcessBuilder(params).start();
log.info("disabled power management via " + String.join(" ", params));
} catch (IOException e) {
Expand Down