-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Proper fix for osproc.nim on Android #5646
Conversation
yay, I can test this. What do I need to install Nim in Termux fully from scratch (I have Termux installed)? I have Android 6.0 |
@cheatfate just tested this, thanks a lot! Changing the return type of @TiberiumN : my steps (android 7, 64bit) :
In In whatever
Nimble may have some problems, I remember libman saying he had to patch I'll look into adding support in |
@stisa My phone is 64bit, Termux reports aarch64 |
@TiberiumN I did write about it:
|
@stisa ah, sorry :) |
@stisa so I can confirm: |
@stisa |
@stisa i know that this fix will allow you to bootstrap Nim, but please test this function: import osproc
proc waitForExit(p: Process, timeout: int = -1): int with This function was affected by this fix, and i want to be sure it still working... |
@cheatfate You are right, it doesn't work (btw the compiler still complains that you return a clong from syscall and it expects a cint as result in sigtimedwait ). |
@stisa please check this one. |
Nope, still |
EINVAL is a problem... |
Ok i think final fix must work, i have tested it on Linux with |
This one works for me, great work @cheatfate! Thanks a lot. code used as a test: import osproc
var p = startProcess("/data/data/com.termux/files/usr/bin/ping",
args=["-c","2","google.com"], options={poParentStreams})
echo p.waitForExit(3333) |
Fix
sigtimedwait
to use direct syscall to __NR_rt_sigtimedwait (available since Android SDK L3).Testing needed...