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

termux-api never returns if Android app is not installed #138

Open
twaik opened this issue Aug 31, 2021 · 0 comments
Open

termux-api never returns if Android app is not installed #138

twaik opened this issue Aug 31, 2021 · 0 comments

Comments

@twaik
Copy link
Member

twaik commented Aug 31, 2021

Problem description
termux-api never returns if Android app is not installed. And atermux-api even does not report that maybe there is a problem.

Steps to reproduce
Uninstall Termux::API application in Android and try to send it command.

Expected behavior
It should report to stderr that there is a problem while trying to contact application and finish with error code.

Additional information

Application version:
0.117
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.librehat.com/apt/termux-main/ stable main
# game-repo (sources.list.d/game.list)
deb https://packages.termux.org/apt/termux-games games stable
# science-repo (sources.list.d/science.list)
deb https://packages.termux.org/apt/termux-science science stable
Updatable packages:
All packages up to date
Android version:
11
Kernel build information:
Linux localhost 4.19.87-20970822 #1 SMP PREEMPT Fri Aug 6 19:16:20 KST 2021 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-G780F

Way to fix
You can try poll a socket before trying to accept it. I mean you should start poll with timeout and then react on POLLIN or finish a program with error.

@twaik twaik changed the title termux-api never returns if Android app is not installed termux-api never returns if Android app is not installed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant