[master] 8a2d3ab11 Move the child's birth announcement up before VEXT and VSTV init.
Poul-Henning Kamp
phk at FreeBSD.org
Thu Apr 6 12:49:05 UTC 2023
commit 8a2d3ab11dc6556b7d5006dff80db23026918597
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Apr 6 12:47:58 2023 +0000
Move the child's birth announcement up before VEXT and VSTV init.
diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 370b8c741..2d8bd510d 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -377,9 +377,6 @@ child_main(int sigmagic, size_t altstksz)
(void)signal(SIGINT, SIG_DFL);
(void)signal(SIGTERM, SIG_DFL);
- setbuf(stdout, NULL);
- setbuf(stderr, NULL);
- printf("Child starts\n");
#if defined(__FreeBSD__) && __FreeBSD_version >= 1000000
malloc_message = child_malloc_fail;
#endif
diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index 0bb82c51c..55259fe90 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -351,6 +351,10 @@ mgt_launch_child(struct cli *cli)
assert(dup2(heritage.std_fd, STDOUT_FILENO) == STDOUT_FILENO);
assert(dup2(heritage.std_fd, STDERR_FILENO) == STDERR_FILENO);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ printf("Child starts\n");
+
/*
* Close all FDs the child shouldn't know about
*
More information about the varnish-commit
mailing list