8000 fix(nix): use os.execv for reload (#268) by MOIS3Y · Pull Request #271 · linkfrg/ignis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(nix): use os.execv for reload (#268) #271

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MOIS3Y
Copy link
Contributor
@MOIS3Y MOIS3Y commented May 19, 2025

Replaced os.execl with os.execv to avoid the additional check for whether the file is a binary (ELF).
I tested the reload functionality in NixOS, and everything works:

ignis init && ignis reload

Unfortunately, I currently don't have the ability to test this fix on other distributions or in more complex restart scenarios.
If os.execv cannot be used for some reason, feel free to close this PR.

@linkfrg
Copy link
Owner
linkfrg commented May 19, 2025

Yes, but what if Ignis is launched using python executable? For example, python ignis/main.py. Then sys.argv[0] will point to the python file (main.py in this case) and os.execv() will fail with PermissionError: [Errno 13] Permission denied, because main.py is not an executable file.

It may sound stupid but launching Ignis using python ignis/main.py will fail now because of the naming collision with python logging module. Anyway I know the fix (UPD: fixed in efebc2e)

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.

2 participants
0