bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (read -r var) vs <(read -r var) behavior


From: Greg Wooledge
Subject: Re: (read -r var) vs <(read -r var) behavior
Date: Tue, 19 May 2015 07:56:35 -0400
User-agent: Mutt/1.4.2.3i

On Tue, May 19, 2015 at 11:23:49AM +0300, Marcelo Azevedo wrote:
> what do you mean here by 'owns' the terminal ? and that in the second
> (subshell) example none of these things is true.
> in '(command)'  is command attached to the terminal and in '<(command)'
> command is not?

"Attached to" is a fuzzy thing.  The command's file descriptors are the
terminal, but the command is running in the background.  Background jobs
are not allowed to read terminal input.  (They are, however, allowed to
write to the terminal.)

The key here is that process substitutions ( <(...) and >(...) ) run
their commands in the background, just as if you had done "command &"
and possibly "disown".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]