From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.bugs Subject: Re: Stable 2.0 and popen.test on Debian Squeeze Date: Tue, 1 Mar 2011 20:32:56 -0500 Message-ID: <20110302013257.1DDMP.140430.root@cdptpa-web28-z02> References: <87aahesk8d.fsf@netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1299029597 14908 80.91.229.12 (2 Mar 2011 01:33:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Mar 2011 01:33:17 +0000 (UTC) Cc: bug-guile@gnu.org, Francis Southern To: Andy Wingo , Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Mar 02 02:33:09 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Puaw9-00073d-DG for guile-bugs@m.gmane.org; Wed, 02 Mar 2011 02:33:09 +0100 Original-Received: from localhost ([127.0.0.1]:58250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Puaw8-0002sd-QL for guile-bugs@m.gmane.org; Tue, 01 Mar 2011 20:33:08 -0500 Original-Received: from [140.186.70.92] (port=51963 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Puaw3-0002qp-Em for bug-guile@gnu.org; Tue, 01 Mar 2011 20:33:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Puaw0-00018u-Sk for bug-guile@gnu.org; Tue, 01 Mar 2011 20:33:03 -0500 Original-Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:33772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Puaw0-00018L-PL for bug-guile@gnu.org; Tue, 01 Mar 2011 20:33:00 -0500 Authentication-Results: cdptpa-omtalb.mail.rr.com smtp.user=dsmich@roadrunner.com; auth=pass (LOGIN) X-Authority-Analysis: v=1.1 cv=pepdxKapwHuwCZNFD5uob2wvham6E+RljB0uXw08FdQ= c=1 sm=0 a=Xn7unpzb4HgA:10 a=IkcTkHD0fZMA:10 a=DeTtaYkFAAAA:8 a=ybZZDoGAAAAA:8 a=DSp_W3AwNQrJ4eDcoFUA:9 a=t3dQwRbF02h5KATPn08A:7 a=ZLHcKqA14MdFW63_9x_Z8S6Gg1YA:4 a=QEXdDO2ut3YA:10 a=BiDrKXtPeRMA:10 a=qIVjreYYsbEA:10 a=bW8dlkdluli1lG/O/RK17Q==:117 X-Cloudmark-Score: 0 Original-Received: from [10.127.132.179] ([10.127.132.179:36833] helo=cdptpa-web28-z02) by cdptpa-oedge03.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTPA id DE/CE-19545-84E9D6D4; Wed, 02 Mar 2011 01:32:57 +0000 In-Reply-To: <87aahesk8d.fsf@netris.org> X-Priority: 3 (Normal) Sensitivity: Normal X-Originating-IP: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 75.180.132.121 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5250 Archived-At: ---- Mark H Weaver wrote: > Andy Wingo 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