unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Andy Wingo <wingo@pobox.com>
Cc: bug-guile@gnu.org, Francis Southern <francis.southern@gmail.com>
Subject: Re: Stable 2.0 and popen.test on Debian Squeeze
Date: Tue, 01 Mar 2011 14:40:02 -0500	[thread overview]
Message-ID: <87aahesk8d.fsf@netris.org> (raw)
In-Reply-To: <m3ei6trv1z.fsf@unquote.localdomain> (Andy Wingo's message of "Sun, 27 Feb 2011 23:07:04 +0100")

Andy Wingo <wingo@pobox.com> writes:
> The difference seems to be the difference between:
>
>   dash -c 'exec 1>/dev/null; echo closed 1>&2; exec 2>/dev/null; read'
>
> and
>
>   bash -c 'exec 1>/dev/null; echo closed 1>&2; exec 2>/dev/null; read'
>
> Dash prints "closed" and exits immediately with error code 2.  Bash
> prints "closed" and waits for input from the "read".
>
> Are we relying on non-portable shell behavior here?

In dash, "read" requires at least one argument: the name of the variable
in which to put the string.  You don't see the error message because
stderr has been redirected to /dev/null.  In bash, the REPLY variable is
used by default.  So the "read" above ought to be changed to
"read REPLY".

    Best,
     Mark



  reply	other threads:[~2011-03-01 19:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25  5:01 Stable 2.0 and popen.test on Debian Squeeze Francis Southern
2011-02-27 22:07 ` Andy Wingo
2011-03-01 19:40   ` Mark H Weaver [this message]
2011-03-02  1:32     ` dsmich
2011-03-02 10:40       ` Mark H Weaver
2011-03-02 11:17       ` Mark H Weaver
2011-03-02 11:28         ` dsmich
  -- strict thread matches above, loose matches on Subject: below --
2011-03-02 11:29 dsmich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aahesk8d.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=bug-guile@gnu.org \
    --cc=francis.southern@gmail.com \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).