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

Unable to display, need to restore with stty echo #1592

Closed
winlinvip opened this issue Feb 5, 2020 · 3 comments
Closed

Unable to display, need to restore with stty echo #1592

winlinvip opened this issue Feb 5, 2020 · 3 comments
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Feb 5, 2020

Description'

Please ensure that the markdown structure is maintained.

Please describe the issue you encountered here.
'
Make sure to maintain the markdown structure.

  1. SRS version: 3.0.114

Replay

How to replay bug?

Steps to reproduce the bug

  1. ./objs/srs -c conf/ingest.conf
    Steps to reproduce the bug:

  2. Press CTRL+C to cancel.

  3. 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

@winlinvip winlinvip added the Bug It might be a bug. label Feb 5, 2020
@winlinvip winlinvip added this to the SRS 3.0 release milestone Feb 5, 2020
@winlinvip
Copy link
Member Author

winlinvip commented Feb 5, 2020

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

@winlinvip
Copy link
Member Author

winlinvip commented Feb 5, 2020

It seems that after starting the FFMPEG process, STDIN was not closed, redirecting STDIN to /dev/null will fix it.

TRANS_BY_GPT3

@winlinvip
Copy link
Member Author

winlinvip commented Feb 5, 2020

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

@winlinvip winlinvip self-assigned this Sep 5, 2021
@winlinvip winlinvip changed the title 无法回显,需要用stty echo恢复 Unable to display, need to restore with stty echo Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

1 participant