Listen to dying child

An r3940 vtest failure on freebsd seems to suggest that the child
does not terminate while blocking in a write.

***  v1    debug|Error: Child (74042) Panic at: Mon, 03 Jul 2023 13:40:40 GMT
***  v1    debug|Assert error in CLI_Run(), cache/cache_cli.c line 102:
***  v1    debug|  Condition((VCLI_WriteResult(heritage.cli_out, CLIS_OK, \"Ready\")) == 0) not true.

This might need another iteration.
parent c0962378
......@@ -558,8 +558,10 @@ mgt_reap_child(void)
vsb = VSB_new_auto();
XXXAN(vsb);
(void)VFIL_nonblocking(child_output);
/* Wait for child to die */
for (i = 0; i < mgt_param.cli_timeout * 10; i++) {
(void)child_listener(NULL, VEV__RD);
r = waitpid(child_pid, &status, WNOHANG);
if (r == child_pid)
break;
......
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