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

Forwarding User Interaction and Feedback in CLI app #196

Open
jenky opened this issue Jan 19, 2024 · 2 comments
Open

Forwarding User Interaction and Feedback in CLI app #196

jenky opened this issue Jan 19, 2024 · 2 comments
Labels

Comments

@jenky
Copy link

jenky commented Jan 19, 2024

Hi there! It's not an issue but rather a question.

I'm working on a CLI app that runs several tasks, and a few of them require user interaction (using Symfony IO or Laravel Prompt) during execution. How can I forward the input from the child process to the main stdout and receive feedback in the child processes? Thanks

@trowski
Copy link
Member

trowski commented Jan 28, 2024

Hi @jenky!

ProcessContext has getStdin() and getStdout() methods to return writable and readable streams, respectively, which may be used to read from STDOUT and write to STDIN of the child from within the parent process. In the parent, you can write the data read from the child STDOUT to STDOUT of the parent and take data received on STDIN of the parent and write it to STDIN of the child.

@medy36
Copy link

medy36 commented Jul 9, 2024

@jenky i have a question regarding your CLI app, i am facing a zombie problem. Files in /tmp/.sock files are left after each run. In web mode the .socket files are destructed correctly, but the same code in CLI mode does not destruct the .socket. Can you please confirm that on your side everything is working ( .sock destruction OK), if So, can you share your versions used for AMP and parallel.
Thank you

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

No branches or pull requests

3 participants