bug#5817: false core util

2010-04-15 Thread Bob Proulx
Bob Proulx wrote:
 phoenix wrote:
  I've found a serious error in the program false: If I pipe some
  text to it (e.g. echo i lost the game | false), it does not fail
  but rather returns a success. Any suggestions?
 ...
 In order to get the coreutils version you would need to specify a path
 to it.  But the shell should still detect this error.

Since it has been two weeks and we haven't heard any replies I am
going to assume that the information supplied solved your problem and
that this bug can be closed.  If you have additional information
please feel free to add it to the bug report.

Thanks,
Bob






bug#5817: false core util

2010-04-03 Thread Bob Proulx
tags 5817 + moreinfo unreproducible
thanks

phoenix wrote:
 I've found a serious error in the program false: If I pipe some text to it
 (e.g. echo i lost the game | false), it does not fail but rather returns a
 success. Any suggestions?

As others noted the 'false' command is a builtin to most shells.
Therefore if you execute the following you are not getting the
coreutils version of false but are instead getting your shell builtin
version of false.  In this case I am running bash and bash detects the
error.

  $ echo foo | false
  -bash: echo: write error: Broken pipe
  $ echo $?
  1
  $ type false
  false is a shell builtin
  $ help false
  false: false
Return an unsuccessful result.

In order to get the coreutils version you would need to specify a path
to it.  But the shell should still detect this error.

  $ echo foo | /bin/false
  -bash: echo: write error: Broken pipe
  $ echo $?
  1

The main reason for a standalone executable is for legacy
compatibility and also on those occations when a program that isn't a
shell needs to exec a program.

 I need this program very much for completing my thesis on
 Pseudo-Riemannian manifolds.

Nice!  And on April 1st too!

 It would very kind of you if you'd inform me when the error has been fixed.
 (Remark: I am using Ubuntu 9.10.)

I do not presently have an Ubuntu system available to test this upon
but I believe it to be a problem specific to either your shell or to
your environment.  Coreutils false doesn't have this problem.  Neither
does Debian which as you know is the basis for Ubuntu.

Humorous Side Note: It has been remarked that false is actually more
portable than true.  Because if it doesn't exist the shell's exit
status is still failure.

Bob






bug#5817: false core util

2010-04-01 Thread phoenix
Hey guys,
I've found a serious error in the program false: If I pipe some text to it
(e.g. echo i lost the game | false), it does not fail but rather returns a
success. Any suggestions? I need this program very much for completing my
thesis on Pseudo-Riemannian manifolds.
It would very kind of you if you'd inform me when the error has been fixed.
(Remark: I am using Ubuntu 9.10.)
Best regards,
Hajo Pei


bug#5817: false core util

2010-04-01 Thread Phillip Susi
On 4/1/2010 7:49 AM, phoenix wrote:
 Hey guys,
 I've found a serious error in the program false: If I pipe some text to it
 (e.g. echo i lost the game | false), it does not fail but rather returns a
 success. Any suggestions? I need this program very much for completing my
 thesis on Pseudo-Riemannian manifolds.
 It would very kind of you if you'd inform me when the error has been fixed.
 (Remark: I am using Ubuntu 9.10.)
 Best regards,
 Hajo Pei

You must be checking it wrong because on Ubuntu 9.10 here it correctly
returns an exit status of 1 for failure.






bug#5817: false core util

2010-04-01 Thread Eric Blake
On 04/01/2010 10:06 AM, Phillip Susi wrote:
 On 4/1/2010 7:49 AM, phoenix wrote:
 Hey guys,
 I've found a serious error in the program false: If I pipe some text to it
 (e.g. echo i lost the game | false), it does not fail but rather returns a
 success. Any suggestions?

What shell are you using?  Typically, false is also a shell builtin, so
maybe your particular shell has a bug.

-- 
Eric Blake   ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature