Add a sleep call after trying to kill a previous client. This
should make the "-r" option to the client work more consistently.
[ISC-Bugs: 18175]
for the patch.
[ISC-Bugs #33351]
+- Added a sleep call after killing the old client to allow time
+ for the sockets to be cleaned. This should allow the -r option
+ to work more consistently.
+ [ISC-Bugs #18175]
+
Changes since 4.1-ESV-R8rc1
- None
oldpid = (pid_t)temp;
if (e != 0 && e != EOF) {
- if (oldpid)
- kill(oldpid, SIGTERM);
+ if (oldpid && (kill(oldpid, SIGTERM) == 0)) {
+ /*
+ * wait for the old process to
+ * cleanly terminate.
+ * Note kill() with sig=0 could
+ * detect termination but only
+ * the parent can be signaled...
+ */
+ sleep(1);
+ }
}
fclose(pidfd);
}