ttys.stdin.end always before exit