I have read that $coproc < command > is different from $< command > & in that coproc will execute command in a sub-shell process.
But when I tested it, it worked just like $< command > &. The test is as follow:
First: test the behavior of $< command > &.
- Run
$nano &on tty1 - On another tty, output from
$ps -t tty1 --forestindicates nano process is child process of the -bash process (login bash shell process -> no sub-shell process was created)
Second: test the behavior of $coproc < command >
- Run
$coproc nanoon tty1 - On another tty, output from
$ps -t tty1 --forestis the same as above (no sub-shell process was created)
So is $coproc < command > simply the same as $< command > &?
The shell used was a bash shell