soil-run () { echo TTY; tty; echo; nohup --version; echo; for t in test-echo test-read test-json-read; do echo; echo "*** Running $t"; echo; $0 $t < $(tty); done } TTY /dev/pts/0 nohup (GNU coreutils) 8.30 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Jim Meyering. *** Running test-echo test-echo () { compare-shells -c 'echo hi; echo status=$?' } ----- dash rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input hi status=0 => dash returned 0 nohup.out doesn't exist ----- bash rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input hi status=0 => bash returned 0 nohup.out doesn't exist ----- mksh rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input hi status=0 => mksh returned 0 nohup.out doesn't exist ----- bin/osh rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input hi status=0 => bin/osh returned 0 nohup.out doesn't exist *** Running test-read test-read () { compare-shells -c 'read x; echo status=$? x=$x' } ----- dash rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input status=1 x= => dash returned 0 nohup.out doesn't exist ----- bash rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input bash: line 0: read: read error: 0: Bad file descriptor status=1 x= => bash returned 0 nohup.out doesn't exist ----- mksh rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input mksh: read: Bad file descriptor status=2 x= => mksh returned 0 nohup.out doesn't exist ----- bin/osh rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input [ -c flag ]:1: Oils read error: Bad file descriptor status=1 x= => bin/osh returned 0 nohup.out doesn't exist *** Running test-json-read test-json-read () { rm -v nohup.out || true; run-shell bin/osh -c 'json read' } rm: cannot remove 'nohup.out': No such file or directory rm: cannot remove 'nohup.out': No such file or directory nohup: ignoring input [ -c flag ]:1: read error: Bad file descriptor => bin/osh returned 1 nohup.out doesn't exist