finish non block stdio