mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-22 18:07:25 +00:00
[master]
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:
parent
6d210be233
commit
ad4001ce80
5
RELNOTES
5
RELNOTES
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user