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

Make sure complaints from the starting child process reach stderr

parent 79718684
......@@ -233,12 +233,14 @@ MCH_Fd_Inherit(int fd, const char *what)
* Listen to stdout+stderr from the child
*/
static const char *whining_child = C_ERR;
static int v_matchproto_(vlu_f)
child_line(void *priv, const char *p)
{
(void)priv;
MGT_Complain(C_INFO, "Child (%jd) said %s", (intmax_t)child_pid, p);
MGT_Complain(whining_child, "Child (%jd) said %s", (intmax_t)child_pid, p);
return (0);
}
......@@ -435,6 +437,7 @@ mgt_launch_child(struct cli *cli)
assert(u == CLIS_OK);
fprintf(stderr, "Child launched OK\n");
}
whining_child = C_INFO;
AZ(ev_listen);
e = VEV_Alloc();
......
......@@ -172,7 +172,7 @@ MGT_Complain(const char *loud, const char *fmt, ...)
else
WRONG("Wrong complaint loudness");
if (complain_to_stderr && loud != C_CLI)
if (loud != C_CLI && (complain_to_stderr || loud != C_DEBUG))
fprintf(stderr, "%s %s\n", loud, VSB_data(vsb));
if (!MGT_DO_DEBUG(DBG_VTC_MODE))
......
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