non-blocking mode cannot recieve all stdin, thus use blocking mode