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

Enable building of foreground default version #50

Closed
xytis opened this issue Sep 25, 2017 · 6 comments
Closed

Enable building of foreground default version #50

xytis opened this issue Sep 25, 2017 · 6 comments
Labels
z-enhancement ⬆️ Product Enhancement

Comments

@xytis
Copy link

xytis commented Sep 25, 2017

Please make a compile-time option for "--no-daemon" as a default state.
In other words: rt->daemon = NXT_DAEMON.

Docker and Systemd environments prefer master pid to stay alive and non-forking.

@thresheek
Copy link
Member

While it's true wrt docker-based environments, that argument does not hold up to systemd - it happily accepts Type=forking to look after forking software.

@igorsysoev
Copy link
Contributor

The program is called unitd which means "unit daemon".
It would be strange if its default mode is foreground.
It can probably be renamed to something else like "unit service".
The name "unit" however is reserved for unit control utility.

@VBart
Copy link
Contributor

VBart commented Sep 25, 2017

Adding a compile time option only complicates things.

Most users will never compile Unit, they will install it from packages. Currently, the behaviour is straightforward: daemonized by default and an option to avoid daemonization. If we introduce the compile time option, users won't know the default.

@VBart VBart added the z-enhancement ⬆️ Product Enhancement label Sep 25, 2017
@xytis
Copy link
Author

xytis commented Sep 26, 2017

@VBart I agree that compile-time flag which I initially proposed would introduce mixup. But as I understood from projects roadmap, you are aiming to bring Nginx Unit into container world as a first-class citizen, for me it just makes sense that applications would start in foreground unless specifically instructed not to do so. For example, with a -d|--daemon flag.

But @igorsysoev has a point too. Which operating systems do have that utility? I searched Debian jessie|stretch|buster and CentOS7 for binary matching that name, yet I could not find any.

@xytis xytis changed the title Enable building of foreground default version Enable building of foreground default version Sep 26, 2017
@igorsysoev
Copy link
Contributor

I meant that "unit" name is reserved for our future control utility.
The utility will control local or remote unitd in the same way as docker control dockerd.

@xytis
Copy link
Author

xytis commented Sep 26, 2017

Oh, thanks for the clarification.
Hashicorp has a similar approach with using single binary and multiple "actions". (unit daemon vs unit [command])

But I see the problem with naming here. I guess I will just have to accept that unitd is daemon by definition :)

@VBart VBart closed this as completed Jun 6, 2018
4141done pushed a commit to 4141done/unit that referenced this issue Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
z-enhancement ⬆️ Product Enhancement
Projects
None yet
Development

No branches or pull requests

4 participants