Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
* "bash -c 'exit 5'" gives 127 !
@ 1995-03-18 15:08 Felix von Leitner
  0 siblings, 0 replies; only message in thread
From: Felix von Leitner @ 1995-03-18 15:08 UTC (permalink / 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-03-18 15:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-18 15:08 "bash -c 'exit 5'" gives 127 ! Felix von Leitner

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