greatly improve freopen behavior
[musl] / src / internal / syscall.c