unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: <dsmich@roadrunner.com>
To: Andy Wingo <wingo@pobox.com>, Mark H Weaver <mhw@netris.org>
Cc: bug-guile@gnu.org, Francis Southern <francis.southern@gmail.com>
Subject: Re: Stable 2.0 and popen.test on Debian Squeeze
Date: Tue, 1 Mar 2011 20:32:56 -0500	[thread overview]
Message-ID: <20110302013257.1DDMP.140430.root@cdptpa-web28-z02> (raw)
In-Reply-To: <87aahesk8d.fsf@netris.org>


---- Mark H Weaver <mhw@netris.org> wrote: 
> 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".

On my Debian Squeeze system:


dsmith@stumpy:~/src/guile$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Mar  1 20:26 /bin/sh -> dash


dsmith@stumpy:~/src/guile$ git diff
diff --git a/test-suite/tests/popen.test b/test-suite/tests/popen.test
index 6300c3b..9604c9c 100644
--- a/test-suite/tests/popen.test
+++ b/test-suite/tests/popen.test
@@ -104,7 +104,7 @@
                     (with-input-from-port (car p2c)
                       (lambda ()
                         (open-input-pipe
-                         "exec 1>/dev/null; echo closed 1>&2; exec 2>/dev/null; read")))))))
+                         "exec 1>/dev/null; echo closed 1>&2; exec 2>/dev/null; read REPLY")))))))
       (close-port (cdr c2p))   ;; write side
       (let ((result (eof-object? (read-char port))))
        (display "hello!\n" (cdr p2c))



dsmith@stumpy:~/src/guile$ ./check-guile popen.test
Testing /home/dsmith/src/guile/meta/guile ... popen.test
with GUILE_LOAD_PATH=/home/dsmith/src/guile/test-suite
Running popen.test
FAIL: popen.test: open-output-pipe: no duplicate

Totals for this test run:
passes:                 14
failures:               1
unexpected passes:      0
expected failures:      0
unresolved test cases:  0
untested test cases:    0
unsupported test cases: 0
errors:                 0



-Dale




  reply	other threads:[~2011-03-02  1:32 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
2011-03-02  1:32     ` dsmich [this message]
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=20110302013257.1DDMP.140430.root@cdptpa-web28-z02 \
    --to=dsmich@roadrunner.com \
    --cc=bug-guile@gnu.org \
    --cc=francis.southern@gmail.com \
    --cc=mhw@netris.org \
    --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).