2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 01:49:35 +00:00
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]
This commit is contained in:
Shawn Routhier 2013-08-27 10:31:27 -07:00
parent 6d210be233
commit ad4001ce80
2 changed files with 15 additions and 2 deletions

View File

@ -92,6 +92,11 @@ work on other platforms. Please report any problems and suggested fixes to
objects.
[ISC-Bugs #27452]
- 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.2.4
- Correct code to calculate timing values in client to compare

View File

@ -404,8 +404,16 @@ main(int argc, char **argv) {
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);
}