You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing the command in the terminal I can see the following response in the terminal.
Creating listening port 10101 for device port 10101
waiting for connection
However, when using the above code, the data event isn't triggered in the child process. Maybe I'm not using the correct event handler; I'm not sure what's happening.
The text was updated successfully, but these errors were encountered:
ajschwieterman
changed the title
iProxy terminal output event handler
iproxy stdout not triggering data event in process
Nov 24, 2020
ajschwieterman
changed the title
iproxy stdout not triggering data event in process
iproxy stdout not triggering data event in child process
Nov 24, 2020
Today I encountered the same problem. Here's the minimum example of it:
$ iproxy 8081:8081
Creating listening port 8081 for device port 8081
waiting for connection
# CTRL+C, this is okay
$ iproxy 8081:8081 1> test.txt 2>&1# CTRL+C, let's see what was written
$ cat test.txt
# the file is empty - not expected
I was very annoyed by this, but a friend helped me and together we figured out how to make it work (kudos to this SO question):
$ stdbuf -i0 -o0 -e0 iproxy 8081:8081 1> test.txt 2>&1
# CTRL+C
$ cat test.txt
Creating listening port 8081 for device port 8081
waiting for connection
It'd be great if you added some fflush() here and there in iproxy :)
I'm trying to get the output of an iproxy command using the following code.
When executing the command in the terminal I can see the following response in the terminal.
However, when using the above code, the
data
event isn't triggered in the child process. Maybe I'm not using the correct event handler; I'm not sure what's happening.The text was updated successfully, but these errors were encountered: