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

Blocking pppd on restore_tty function #424

Open
tdolata opened this issue May 22, 2023 · 2 comments
Open

Blocking pppd on restore_tty function #424

tdolata opened this issue May 22, 2023 · 2 comments

Comments

@tdolata
Copy link

tdolata commented May 22, 2023

With the hardware flow control option active and in if the modem is not properly connected (or missing).
In this case, the chat blocks on sending the first AT command, then the chat terminates with an error after receiving a SIGALARM.
The pppd detects an invalid chat termination and attempts to restore the saved tty settings in the restore_tty function.
Unfortunately, the tcsetattr function is called with the TCSAFLUSH flag, this causes the program to wait for the transmit buffer to empty, which never happens.
The solution is to change the flag to TCSANOW or to call the tcflush function previously.

@Neustradamus
Copy link
Member

@paulusmack, @enaess: Have you seen this ticket?

@paulusmack
Copy link
Collaborator

I think calling tcflush in restore_tty is reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants