Closed AccessArctic closed 3 years ago
Hello,
I have the same issue here, tty_fake will exit/close after a process stops reading from it. I don’t know yet if this is intended or if this is an issue that requires fixing.
Reproductible example:
In terminal 1:
./tty_bus -s /tmp/ttyS0mux
Creating bus: /tmp/ttyS0mux
In terminal 2:
./tty_fake -s /tmp/ttyS0mux /tmp/ttyS0fake0
Connecting to bus: /tmp/ttyS0mux
Device: /dev/pts/8 is now /tmp/ttyS0fake0
In terminal 3:
cat /tmp/ttyS0fake0
When closing cat in terminal 3, tty_fake in terminal 2 will exit.
@danielinux is this intended and is there a workaround to keep tty_fake running, or should I fix this?
@nicolaje If you can fix it, I would love to have your updated version as for me this is definitely an unwanted behaviour
Is the PULLHUP fix in the pending PR #6 solving this for you? I never had the time to review those. I'm open to merge that PR (and/or more fixups) if it makes sense.
Looks promising indeed. I will have a check, but don't have my RPi at hand right now. Thanks
Hello, indeed the changes made in this pull request prevent tty_fake from exiting when a process that was reading from it closes.
So it solves this issue for my use case, although I didn't review the whole PR extensively.
@danielinux can I help you further to merge this PR into master ?
Merged #6 . Thanks everyone, apologies for not being very reactive on this project.
Thank you for your time.
After setting correctly a bus with a real serial port and 2 fake port (can see the data in two independent terminal via miniterm/screen/a specific software), if the connection ttyS0fake0 (same with fake1) is closed, it cannot be reopen. It is necessary to kill the tty_fake process and restart it:
on a different terminal:
on a different terminal:
on a different terminal:
then if closing the miniterm and trying to reopen it with the same command, it won't work