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

onUnitNew is triggered with every property check. #440

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

jmlich
Copy link
Contributor

@jmlich jmlich commented Dec 24, 2024

If the systemd unit doesn't exist, the call systemdServiceIface.getProperty creates a temporary systemd unit, which triggers onUnitNew. This results in a loop that causes the issue.

Fixes #439

@@ -147,7 +137,8 @@ ApplicationWindowPL
signal unitNew(string name)
onUnitNew: {
Copy link
Owner

Choose a reason for hiding this comment

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

Should we just remove this entire block then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, looks much better when whole block is removed.

I added just comment because the checking onUnitNew seems to be reasonable, but leads to unexpected infinite loop.

@jmlich jmlich force-pushed the systemd-unit-recursion branch from 9e41761 to cf0d872 Compare January 14, 2025 07:34
If the systemd unit doesn't exist, the call systemdServiceIface.getProperty
creates a temporary systemd unit, which triggers onUnitNew.
This results in a loop that causes the issue.

Fixes piggz#439
@jmlich jmlich force-pushed the systemd-unit-recursion branch from cf0d872 to 0297d86 Compare January 14, 2025 07:35
@piggz piggz merged commit a1b3671 into piggz:master Jan 15, 2025
7 checks passed
@jmlich jmlich deleted the systemd-unit-recursion branch January 18, 2025 09:39
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.

infinite recursion in systemd units handling
2 participants