Skip to content

launcher: don't fallback to double-forking if systemd-run fails#2965

Open
jinliu wants to merge 1 commit into
noctalia-dev:mainfrom
jinliu:feature/remove-systemd-launcher-fallback
Open

launcher: don't fallback to double-forking if systemd-run fails#2965
jinliu wants to merge 1 commit into
noctalia-dev:mainfrom
jinliu:feature/remove-systemd-launcher-fallback

Conversation

@jinliu

@jinliu jinliu commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Since the systemd-run path is only used on an option which has to be explicitly enabled by the user, if it fails, it's better to just fail the launch, so the user can be aware of the issue.

Still fallback to double-forking if systemd is not detected, in case there's a leftover in the config file enabling the systemd launcher on a non-systemd setup. In this case, there's no such option in settings UI, so the user won't even know that the option is enabled, anyway.

Copilot AI review requested due to automatic review settings June 10, 2026 04:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adjusts the desktop entry launch flow to propagate a boolean result from the “run as systemd service” code path, and simplifies the systemd-run execution path.

Changes:

  • Change process::runAsyncAsSystemdService to return bool and propagate it to callers.
  • Remove the systemd-run failure fallback logic inside the systemd service launcher.
  • Update desktop entry launch call sites to return the systemd-service launch result.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/system/desktop_entry_launch.cpp Propagates boolean return value from systemd-service launch path.
src/core/process.h Updates API signature of runAsyncAsSystemdService to return bool.
src/core/process.cpp Implements boolean-returning API and simplifies systemd-run execution (removing fallback).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/core/process.cpp Outdated
Comment thread src/core/process.cpp
Comment thread src/core/process.h Outdated
@jinliu jinliu force-pushed the feature/remove-systemd-launcher-fallback branch from 9bb1450 to 8fca09c Compare June 10, 2026 13:28
@Ly-sec

Ly-sec commented Jun 11, 2026

Copy link
Copy Markdown
Member

Hey @jinliu I'd merge it like that but perhaps we should inform the user with a notification toast or something so it's very obvious? Not sure

@jinliu

jinliu commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Hey @jinliu I'd merge it like that but perhaps we should inform the user with a notification toast or something so it's very obvious? Not sure

Good idea. But that would be like a runAsync(systemd-run) with a callback, but since the callback won't be in the main thread, I don't know how to make a toast from it.

@jinliu jinliu force-pushed the feature/remove-systemd-launcher-fallback branch from 8fca09c to c4176dd Compare June 12, 2026 03:37
Since the systemd-run path is only used on an option which has to be
explicitly enabled by the user, if it fails, it's better to just fail
the launch, so the user can be aware of the issue.

Still fallback to double-forking if systemd is not detected, in case
there's a leftover in the config file enabling the systemd launcher on a
non-systemd setup. In this case, there's no such option in settings UI,
so the user won't even know that the option is enabled, anyway.
@jinliu jinliu force-pushed the feature/remove-systemd-launcher-fallback branch from d5ab69e to b14984d Compare June 12, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants