mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [Patch] hush exit code fix
@ 2010-03-05 10:51 Jan Weitzel
  2010-03-12  9:01 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Weitzel @ 2010-03-05 10:51 UTC (permalink / raw)
  To: barebox

hush: pass return code from exit command within if statement

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
---
diff --git a/common/hush.c b/common/hush.c
index cf6704b..ae09374 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -535,10 +535,9 @@ static int run_pipe_real(struct pipe *pi)
        if (pi->num_progs == 1)
                child = & (pi->progs[0]);
        if (pi->num_progs == 1 && child->group) {
-               int rcode;
                debug("non-subshell grouping\n");
-               rcode = run_list_real(child->group);
-               return rcode;
+               run_list_real(child->group);
+               return last_return_code;
        } else if (pi->num_progs == 1 && pi->progs[0].argv != NULL) {
                for (i=0; is_assignment(child->argv[i]); i++) { /* nothing */ }
                if (i!=0 && child->argv[i]==NULL) {



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-12  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-05 10:51 [Patch] hush exit code fix Jan Weitzel
2010-03-12  9:01 ` Sascha Hauer

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