Commit 92354226 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Keep track of being started in "no VCL" mode, and don't attempt

to start the child process.
parent 1b833e5f
...@@ -459,6 +459,7 @@ main(int argc, char * const *argv) ...@@ -459,6 +459,7 @@ main(int argc, char * const *argv)
const char *W_arg = NULL; const char *W_arg = NULL;
const char *x_arg = NULL; const char *x_arg = NULL;
int s_arg_given = 0; int s_arg_given = 0;
int novcl = 0;
const char *T_arg = "localhost:0"; const char *T_arg = "localhost:0";
char *p; char *p;
struct cli cli[1]; struct cli cli[1];
...@@ -619,8 +620,10 @@ main(int argc, char * const *argv) ...@@ -619,8 +620,10 @@ main(int argc, char * const *argv)
VTAILQ_INSERT_TAIL(&f_args, fa, list); VTAILQ_INSERT_TAIL(&f_args, fa, list);
break; break;
case 'f': case 'f':
if (*optarg == '\0') if (*optarg == '\0') {
novcl = 1;
break; break;
}
ALLOC_OBJ(fa, F_ARG_MAGIC); ALLOC_OBJ(fa, F_ARG_MAGIC);
AN(fa); AN(fa);
REPLACE(fa->farg, optarg); REPLACE(fa->farg, optarg);
...@@ -814,10 +817,10 @@ main(int argc, char * const *argv) ...@@ -814,10 +817,10 @@ main(int argc, char * const *argv)
mgt_SHM_Create(); mgt_SHM_Create();
if (!d_flag && !mgt_has_vcl()) if (!d_flag && !mgt_has_vcl() && !novcl)
MGT_Complain(C_ERR, "No VCL loaded yet"); MGT_Complain(C_ERR, "No VCL loaded yet");
u = MCH_Init(d_flag ? 0 : 1); u = MCH_Init(d_flag || novcl ? 0 : 1);
if (eric_fd >= 0) if (eric_fd >= 0)
mgt_eric_im_done(eric_fd, u); mgt_eric_im_done(eric_fd, u);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment