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

Add command line argument to allow a no-fork mode #160

Merged
merged 2 commits into from
May 30, 2024

Conversation

sixpounder
Copy link
Contributor

@sixpounder sixpounder commented Mar 14, 2024

This is a quick edit I had to make in order to debug a slight issue I had on my system, and I thought could be useful to other people as well.

I did not add any fancy command line argument parser such as clap, just moved the command line argument parsing on top of the main function and allowed it to parse a --no-daemon argument to avoid process forking.

Forking is still the default behaviour.

- Move arg parsing on top of main function
- Add support for --no-daemon argument
- Fork the process only if --no-daemon was not passed (so forking is
  still the default)
@Quackdoc
Copy link

I've run into the same issue on other cosmic applications. I was thinking about making PRs for pretty much the same thing on some of the other cosmic applications as a compile time feature flag

Copy link
Contributor

@ChocolateLoverRaj ChocolateLoverRaj left a comment

Choose a reason for hiding this comment

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

I tried it and it works. It's great for developing cosmic-term because I can just close the terminal and cargo r command with either Ctrl+C or closing the window.

@jackpot51 jackpot51 merged commit 634a247 into pop-os:master May 30, 2024
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.

None yet

4 participants