sysdeps/managarm: Return EWOULDBLOCK in sys_accept if needed
@@ -31,10 +31,14 @@ int sys_accept(int fd, int *newfd) {
managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
resp.ParseFromArray(recvResp.data(), recvResp.length());
+ if(resp.error() == managarm::posix::Errors::WOULD_BLOCK) {
+ return EWOULDBLOCK;
+ }else{
__ensure(resp.error() == managarm::posix::Errors::SUCCESS);
*newfd = resp.fd();
return 0;
}
+}
int sys_bind(int fd, const struct sockaddr *addr_ptr, socklen_t addr_length) {
SignalGuard sguard;
