Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
From: leitner@inf.fu-berlin.de (Felix von Leitner)
Subject: "bash -c 'exit 5'" gives 127 !
Date: 18 Mar 1995 17:08:08 +0200	[thread overview]
Message-ID: <3ket0o$7ds@kruuna.helsinki.fi> (raw)

Hi Folks !

While trying to compile Andrew and some other large projects with huge
makefile systems using /bin/sh under Linux (where /bin/sh is bash), I
found this strange behaviour :

  $ sh -c 'exit 5' ; echo $?
  127
  $

This broke all makefiles using "sh -c".  So I began tracing this in bash
and found that it is no bug, it's a features ;)  At least it looks like
it was meant this way.  But I find it not only strange, I find it wrong.
Under all other Unixes I could try it on, it worked like expected,
returning 5.  Well, if somebody else wants to correct this in
bash-1.14.3, this is the diff for shell.c

Felix

---
1036d1035
< 	case EXITPROG:
1037a1037,1038
> 	case EXITPROG:
> 	  return last_command_exit_value;
---

--
If Rush Limbaugh doesn't need a disclaimer, neither do I.
"Who is General Failure and why is he reading my hard disk ?"
  Microsoft spel chekar vor sail, worgs grate !!

--
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember Keywords: and a short description of the software.


                 reply	other threads:[~1995-03-18 15:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox