-
Notifications
You must be signed in to change notification settings - Fork 206
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
Support for accept{,4}
#284
Comments
cc @Deepansharora27 perhaps you could be interested in contributing to this? |
wasi-libc/libc-top-half/musl/src/network/accept.c Lines 1 to 7 in 7302f33
wasi-libc/libc-top-half/musl/src/network/accept4.c Lines 7 to 19 in 7302f33
As I was iterating and trying to get an understanding of the repository, I have found prototype implementations of both the |
Those accept.c and accept4.c files are in the libc-top-half/musl directory and are part of musl. musl upstream only supports Linux, so to make it work for wasi, we only use musl's "top half"—things like printf, qsort, etc.—and disable its "bottom half—things like read, open, but also accept and accept4 as seen here. Specifically, in the code in these musl files, For wasi-libc, we'll need to add libc-bottom-half/sources/accept.c and libc-bottom-half/sources/accept4.c, which likely do something similar, but which call the WASI functions instead of doing Linux syscalls. Also, WASI doesn't have |
With #282 in place, it should be now possible to implement
accept
andaccept4
.The text was updated successfully, but these errors were encountered: