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

is it possible to add the ability for boost::process::child to support the execution of commands by specified users? #367

Open
zhixingchen0629 opened this issue May 8, 2024 · 3 comments

Comments

@zhixingchen0629
Copy link
Contributor

It is very common to specify a user to start a process to execute related commands. In the boost::process library, it is not supported to create a specified user process to execute tasks. On the linux side, the executor of the child process can be modified through a custom on_exec_setup function, but on the windows side, there is no such hook point as linux to specify the user-created process. In boost::process, the windows side creates the process by calling CreateProcess. When i need to specify a user to create a process, i need to call CreateProcessAsUser to specify the user to create the process and specify the task. Is it possible to add the function to support the specified user to create the process and execute commands?

@klemens-morgenstern
Copy link
Collaborator

This is supported in v2 by using the as_user_launcher.

@zhixingchen0629
Copy link
Contributor Author

Is this feature integrated into the official release version? If so, in which version was it incorporated?

@zhixingchen0629
Copy link
Contributor Author

I find this part was merged in version 1.80.0

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

No branches or pull requests

2 participants