-
Notifications
You must be signed in to change notification settings - Fork 55
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
Real time output #11
Comments
Hmm, no and I currently don't really have plans to implement something like this. Would have to think about a nice and easy OO interface first. But let's keep it open as a feature request. But I would not wait for it ;). |
Draft for discussion: schmunk42@1606eef CC: @phpnode |
From the discussions in the commit:
Great :) So this is basically just a little example for the docs. |
+1 - live output is needed for example on long running processes. My proposition of solving this is in https://github.com/Antoniossss/php-shellcommand/tree/issue-11-live-output fell free to fetch those changes. As a feature requirement I am using that code right now. Output to stdout is only on demand, and output is still buffered and available as a whole after process finishes. Another solution would be to expose additional output pipe for the user to fetch directly from the stream insteed of echoing everything right away, or even allow user to define his own stream that output should be piped to. |
That sounds nice to me. |
How about a callback? You could configure it with the class and whenever there's a new output fragment the function is called. Would that make sense? If we do that, we should also think if we need different callbacks for stdout and sterr. I have to admit that I'm not really an expert on continuous output of commands. So more feedback welcome.
Yes, that's what I also considered. But this again makes things ugly. Developers should not have to deal with pipes if possible. |
@mikehaertl Callback would also make sense and would satisfy both of us - there would be no direct output - just as you wanted, and I would have possibility to echo incoming data in realtime. |
Closing this as an implementation is far from trivial and would cause too many headaches. Also see my comment here: #27 (comment) |
Is there a way to show the realtime output of a long running command on the console?
Similar to what's described here.
The text was updated successfully, but these errors were encountered: