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

Windows service supports only 1 currently daemon per user #574

Open
MolotovCherry opened this issue Nov 3, 2024 · 2 comments
Open

Windows service supports only 1 currently daemon per user #574

MolotovCherry opened this issue Nov 3, 2024 · 2 comments
Labels
o: Windows A Windows OS exclusive issue t: Discussion t: Enhancement Something that exists, but could be made better

Comments

@MolotovCherry
Copy link
Contributor

MolotovCherry commented Nov 3, 2024

Describe the bug

Strictly speaking it is possible on Windows to have a user running in the background and log into another user. In such an instance what would currently happen is that the daemon would only run for the first logged in user, but do nothing for the new user (even if they have a config).

It is not clear to me yet how (if) this should be handled. Also, what should happen if the new user that logs in doesn't even use or want pueued to run? Since this is a system service, it impacts all users on the system

It is possible to refactor it to track multiple session logons and run multiple pueued processes as different users.
Edit: This also would require installing the service with pueued in a place globally accessible by all users

The current method was done because from a single administrator user POV, it is obvious they want pueued to run every time, otherwise they wouldn't have installed the service. Most people use their systems as a single user anyways. But from a multi user point of view, what should be done is less clear.

This issue is filed for discussion purposes, and also as a preventative measure in case someone decides to file an issue down the line about this.

@Nukesor
Copy link
Owner

Nukesor commented Nov 4, 2024

In Unix environments it's pretty trivial to setup services for individual users, especially due to the usage of Unix sockets.

I generally don't see an issue with supporting this, but it's also something that might not even be needed by anybody :D It's a pretty special usecase.

I would propose to keep this open for a bit and see if anybody is interested :)
Even if nobody wants

@MolotovCherry
Copy link
Contributor Author

MolotovCherry commented Nov 4, 2024

If this were to be done, I'm leaning more towards a cli flag, mainly because the daemon needs special setup.

That is, it needs to be in a global location accessible by all users as the daemon is run as the currently logged in user; and they likely wouldn't have permission to access other users data. For this reason, by default the daemon can't even do multi-user (most people would place the binary in their user folder somewhere, which is perfectly fine as a single user, but not as multi user). The flag has a dual purpose of acting as a check, "Yes, I set it up correctly" and also "I want this kind of behavior".

(It also turns out that there would be a "bug" in multi-user scenario due to the aforementioned location. If you instead first logged in to another user when pueued was placed in another non-logged in user's folder, then it will try to start up, but fail due to no perms to access the binary. The flag and proper user setup would fix this scenario. This "bug" actually ceases to be a bug when you consider that the daemon service is single user only, and add a multi-user mode)

Windows 10+ also has per-user services, but I am not certain this is the proper approach since it lists on the page, "When the user signs out, these services are stopped and deleted.". Stopping is great, but deleting though..

@Nukesor Nukesor added t: Discussion t: Enhancement Something that exists, but could be made better labels Nov 14, 2024
@Nukesor Nukesor changed the title [Bug] Windows service supports only 1 currently daemon per user Windows service supports only 1 currently daemon per user Nov 14, 2024
@Nukesor Nukesor added the o: Windows A Windows OS exclusive issue label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
o: Windows A Windows OS exclusive issue t: Discussion t: Enhancement Something that exists, but could be made better
Projects
None yet
Development

No branches or pull requests

2 participants