On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa <jo...@kernel.org> wrote: [SNIP] > @@ -263,9 +605,16 @@ static int __cmd_start(struct daemon *daemon, struct > option parent_options[], > signal(SIGTERM, sig_handler); > > while (!done && !err) { > - if (fdarray__poll(&fda, -1)) { > + err = daemon__reconfig(daemon);
I think it's confusing since you put the reconfig function here. What not split normal and reconfig passes? I mean something like below __cmd_start() { setup_server_config(); daemon__run(); while (!done && !err) { ... if (reconfig) { daemon__kill(); setup_server_config(); daemon__reconfig(); } } Thanks, Namhyung > + > + if (!err && fdarray__poll(&fda, -1)) { > + bool reconfig = false; > + > if (fda.entries[sock_pos].revents & POLLIN) > err = handle_server_socket(daemon, sock_fd); > + > + if (reconfig) > + err = setup_server_config(daemon); > } > } > > -- > 2.29.2 >