greatly improve freopen behavior
[musl] / src / thread / tls.c