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

allow a way for the child to communicate with the parent #19

Open
kahing opened this issue Feb 17, 2017 · 5 comments
Open

allow a way for the child to communicate with the parent #19

kahing opened this issue Feb 17, 2017 · 5 comments
Assignees
Labels

Comments

@kahing
Copy link

kahing commented Feb 17, 2017

and vice versa. Possibly by just using a pipe?

@kahing
Copy link
Author

kahing commented Feb 17, 2017

looks like there's already a pipe but it's closed before control is returned to the application. Possibly just need an option to not close the pipe

@sevlyar
Copy link
Owner

sevlyar commented Feb 17, 2017

@kahing Thank you for the request. Please explain what scenario do you want to implement?
It is possible to extend Context with a binary data which will be transferred to the child on the start.
The library use a unnamed pipe to transfer context to the child but there is no a way to use the pipe after terminating of the parent's process because the pipe is closed automatically by OS (on parent's side).
If you want sometimes to connect to the child and send complex commands, we can use Named Pipe, i think. For simple commands is better to use System Signals.

@kahing
Copy link
Author

kahing commented Feb 17, 2017

The use case is the parent want to wait for the child to potentially show errors to the user. I currently use signals as you can see in kahing/goofys@eb7963e . However things like error messages are lost. I could use the logfile mechanism but that seems kind of overkill for just one error message.

@sevlyar
Copy link
Owner

sevlyar commented Feb 20, 2017

Ok, i think i understood you. I have an idea how to implement it.

@Cnly
Copy link

Cnly commented Aug 14, 2018

Would like to know how this issue is going... A pipe is also a good solution, if not the best, when the parent process wants to pass some credentials to its child.

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

No branches or pull requests

3 participants