bug-bash
[Top][All Lists]
Advanced

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

Re: coprocess questions (manpage doesn't seem clear)


From: Linda Walsh
Subject: Re: coprocess questions (manpage doesn't seem clear)
Date: Tue, 12 Apr 2011 07:29:50 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Thunderbird/2.0.0.24 Mnenhy/0.7.6.666



Chet Ramey wrote:
The default name is COPROC.
--- Hmmm that one is right there...just overlooked due to phrasing and
        formatting:

      This creates a coprocess named NAME.  If  NAME  is  not
      supplied,  the default name is COPROC.  NAME must not be supplied
      if command is a sim- ple command (see above); otherwise, it is
      interpreted as the first word of  the simple command.  When the
      coproc is executed, the shell creates an array variable (see
      Arrays below) named NAME in the context  of  the executing
      shell.   The  standard  output of command is connected via a pipe
      to a file  descriptor  in  the  executing  shell,  and  that
      file descriptor  is  assigned  to NAME[0].  ....

In reading the above I was looking for how it communicated and skimmed
for 'standard output.  Saw Name, and skimmed backwards for a literal
(something that didn't look like the format used for NAME, a "variable".
Since allcaps and underlined was used as a non-literal placeholder for
the name that the user chose, why is COPROC in the same format?
        The formatting for 'COPROC' seems inconsistent with the literal
language terms, in that they are not underlined -- nor are literal names
of variables underlined in the Shell Variables section.

        Might I suggest that it might be more clear if underlining was
left off COPROC and as well as setting it off via 'quotes' from the
surrounding text.





 2) Where does it put FH2 (stderr)?

It does not modify stderr, just as pipes do not.
--- Makes sense when I think of them that way.





reply via email to

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