On 15/10/2020 16:11, k...@plushkava.net wrote: > On 15/10/2020 08:03, Michael Felt wrote: > >> $ exec </dev/null >> $ exit >> root@x065:[/data/prj/gnu/bash/bash-5.0.18] >> >> ``` >> >> As you can see by the return of the original PS1 - the sub-shell >> (./bash) 'crashed' -- I did not type 'exit' - that is a result of the >> 'exec </dev/null' command the line before. > Upon running "exec </dev/null", the standard input is no longer > attached to your terminal emulator. Consequently, bash tries to read > from /dev/null, only to encounter EOF. As there is no further input to > be processed, it exits. > > You can prevent this from happening by running a script, or by using > the -c option to convey the code. Doing so will launch a > non-interactive instance of bash that does not read commands from the > standard input. > > Incidentally, it is not a subshell but an ordinary subprocess. Thanks - I'll try and give that a try to help understand what is going on in the test.
As I'll mention in my reply to Chet - the concern is because 'make test' stops, rather than just report an error.