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

Daemons #1040

Closed
thany opened this issue Sep 2, 2016 · 5 comments
Closed

Daemons #1040

thany opened this issue Sep 2, 2016 · 5 comments

Comments

@thany
Copy link

thany commented Sep 2, 2016

TLDR: A daemon should start with windows if it's registered with upstart, and should not close if started manually from the terminal.

Here be the Answers report: http://answers.microsoft.com/en-us/windows/forum/windows_10-performance/a-daemon-installed-in-linux-subsystem-doesnt-keep/28a55865-38d2-412d-b189-2615f29aa586

@stehufntdev
Copy link
Collaborator

Thanks for reporting the issue. There's a few related posts on this so closing it out as a duplicate. Please see #834 for more details.

@thany
Copy link
Author

thany commented Sep 2, 2016

I think that's slightly different. That issue is about autostarting daemons. I'm talking about not stopping (killing?) them when I just close the bash terminal.

Just like wehn opening a command prompt and starting a Windows service from there, that service also isn't stopped when I close the command prompt. It's a separate process that does not magically become dependent on whichever command prompt happened to have started it.

I would also like to know why daemons are stopped when the terminal closes. What's the mechanism there?

@stehufntdev
Copy link
Collaborator

Sorry I read your post as two fold that daemons should autostart and not exit when the last bash window closes. For the latter part see #1007 for a recent discussion and related posts.

To answer your question on why, in current builds when the last bash terminal exits the WSL instance is shutdown.

@thany
Copy link
Author

thany commented Sep 2, 2016

Does it need to shutdown? Is it going to be in the way of anything?

@stehufntdev
Copy link
Collaborator

No it does not need to be shutdown, it is just the current behavior - the lifetime of the WSL instance is tied to bash terminals. If you don't want it to shutdown, there are some suggestions in the other posts for workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants