fix tls atexit don't call in main thread
fix sigpipe cause crash