How can I run a program in its own tty?
It seems script
is the solution, as mentioned by A.B. With -e
you even get the return code of the program. cat -vet
shows more explicitly the carriage return ^M
and newline $
.
$ script -q -e out -c ./pusher.bin >/dev/null; echo $?
0
$ cat -vet out
Script started on Mon Dec 21 10:54:40 2020$
echo 'Catch me if you can'^M$