it seems like the fundamental issue here is that adb socket accept does not set errno if  fh alloc fails  maybe consider fixing that and then kill the errno checking in this func sorry  i should fixed adb socket accept myself when i last touched it 