Permalink
Browse files

Restore old argv behaviour which was lost with rc_TESTING.

The first argv deriving from cmdline will be used for all
remaining executables.  Sucky semantics, but while we're in
limbo, we're in limbo, and not much sense can be made here.
  • Loading branch information...
1 parent 42dfa5a commit 870d868414fe946ee2e24dd6f73d64d27afea4e0 @anttikantee anttikantee committed Nov 25, 2015
Showing with 4 additions and 2 deletions.
  1. +1 −0 include/rumprun-base/config.h
  2. +1 −1 lib/librumprun_base/config.c
  3. +2 −1 lib/librumprun_base/main.c
@@ -35,6 +35,7 @@ void rumprun_config(char *);
#define RUMPRUN_EXEC_BACKGROUND 0x01
#define RUMPRUN_EXEC_PIPE 0x02
+#define RUMPRUN_EXEC_CMDLINE 0x04
struct rumprun_exec {
int rre_flags;
@@ -109,7 +109,7 @@ makeargv(char *argvstr)
rumprun_parseargs(argvstr, &nargs, rre->rre_argv);
rre->rre_argv[nargs] = NULL;
- rre->rre_flags = 0;
+ rre->rre_flags = RUMPRUN_EXEC_CMDLINE;
rre->rre_argc = nargs;
TAILQ_INSERT_TAIL(&rumprun_execs, rre, rre_entries);
@@ -49,7 +49,8 @@ mainlike_fn rumpbake_main8;
break; \
rumprun(rre->rre_flags, rumpbake_main##i, \
rre->rre_argc, rre->rre_argv); \
- rre = TAILQ_NEXT(rre, rre_entries); \
+ if ((rre->rre_flags & RUMPRUN_EXEC_CMDLINE) == 0) \
+ rre = TAILQ_NEXT(rre, rre_entries); \
if (rre == NULL) { \
bmk_printf("out of argv entries\n"); \
break; \

0 comments on commit 870d868

Please sign in to comment.