Radu Greab wrote: > > The patch to qpsmtpd-async also closes the config socket in child. I > think the child does not need that socket.
I used the config port for the first time today and I found that, if my patch is applied, the config port becomes useless: you can connect to it but there is nothing interesting to see because the clients are connected to the child, not to the parent. I'm submitting an updated patch that keeps the original functionality of the config port. With the updated patch, the config socket is kept open in both parent and child (or children) and all processes will monitor it. However it will be a matter of luck which process will accept the connection, either the parent or a child. Am I right to suppose that a better option would be to have the config port open and watched only in the parent and when someone connects to it and issues commands the parent will relay the commands to _all_ children, will wait for all results and will send back the combined output from all children? Thank you, Radu Greab
=== qpsmtpd-async ================================================================== --- qpsmtpd-async (revision 111) +++ qpsmtpd-async (local) @@ -163,9 +163,12 @@ $SIG{PIPE} = 'IGNORE'; $SIG{HUP} = 'IGNORE'; + # close $CONFIG_SERVER; + Qpsmtpd::PollServer->Reset; Qpsmtpd::PollServer->OtherFds( - fileno($reader) => sub { command_handler($reader) }, - fileno($SERVER) => \&accept_handler, + fileno($reader) => sub { command_handler($reader) }, + fileno($SERVER) => \&accept_handler, + fileno($CONFIG_SERVER) => \&config_handler, ); $plugin_loader->run_hooks('post-fork');