Unable to display, need to restore with stty echo
winlinvip opened this issue · comments
Description'
Please ensure that the markdown structure is maintained.
Please describe the issue you encountered here.
'
Make sure to maintain the markdown structure.
- SRS version:
3.0.114
Replay
How to replay bug?
Steps to reproduce the bug
-
./objs/srs -c conf/ingest.conf
Steps to reproduce the bug: -
Press
CTRL+C
to cancel. -
There may be no feedback, so you need to run
stty echo
to restore it.
Note: It is easier to reproduce when there are multiple Ingesters.
Expected behavior (Expect)
> Describe your expectation (Please describe your expectation)
Terminal echo is normal.
TRANS_BY_GPT3
Change to print logs without color, directly use printf(log_str), the same issue will occur.
Enabling 3 Ingests almost always triggers it, it can also be reproduced by using killall srs.
TRANS_BY_GPT3
It seems that after starting the FFMPEG process, STDIN was not closed, redirecting STDIN to /dev/null will fix it.
TRANS_BY_GPT3
There is no direct closing of stdin, but instead dup2(/dev/null, stdin) is used to keep stdin file descriptor existing. There was a comment mentioning that closing stdin would cause FFMPEG to fail. Although it did not fail when tested, there might be some risks, so the dup2 method was adopted.
TRANS_BY_GPT3