* Revert "Fix intermittent test crash (#6268)"
This reverts commit 555d9ee7630e0d347e0d8d35e7dd028ff860f3f7.
* make a working version again
* try second impl
* add
* fmt
* check stdin is atty before acquire stdin
* add libc
* clean comment
* fix typo