As worker, close the unneeded listening socket.

This commit is contained in:
Sven Geuer 2024-01-21 23:04:33 +01:00
parent 4690473fba
commit cef27b8576
No known key found for this signature in database
GPG key ID: ADF50EDAF8ADD585

View file

@ -343,6 +343,9 @@ void do_daemon()
if ( ( pid = fork() ) < 0 ) {
my_perror( "Cannot fork worker" );
} else if ( pid == 0 ) {
/* As worker, we do not need to listen for new connections */
close(listen_sd);
read_fd = write_fd = sd_client;
/* Create a stdin/out stream */