diff options
author | jiung-yu <jiung.yu@samsung.com> | 2022-07-04 13:42:19 +0900 |
---|---|---|
committer | jiung-yu <jiung.yu@samsung.com> | 2022-07-04 13:42:35 +0900 |
commit | bf5c28a078f9d0bec9f03ed81d3ff59a51d77385 (patch) | |
tree | 0738c9bccfd55b5ffee137cfbe4443b00e518e56 | |
parent | 346911646d7804ee00db6a495c22fc61d188a808 (diff) | |
download | toybox-bf5c28a078f9d0bec9f03ed81d3ff59a51d77385.tar.gz toybox-bf5c28a078f9d0bec9f03ed81d3ff59a51d77385.tar.bz2 toybox-bf5c28a078f9d0bec9f03ed81d3ff59a51d77385.zip |
Remove Sigterm handler
Description:
DF220609-00728 dhcpd doesn't killed by Sigterm 15.
The lease file will be erased by wifi-direct-dhcp.sh before
dhcp or dhcpd is started.
Change-Id: I55fd41274c947f04b76d6c08a7840a0a9bc213f7
Signed-off-by: Yu jiung <jiung.yu@samsung.com>
-rw-r--r-- | packaging/toybox.spec | 2 | ||||
-rw-r--r-- | toys/pending/dhcpd.c | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/packaging/toybox.spec b/packaging/toybox.spec index 4a67ea7..07d23e8 100644 --- a/packaging/toybox.spec +++ b/packaging/toybox.spec @@ -1,6 +1,6 @@ Name: toybox Version: 0.6.0 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Single binary providing simplified versions of system commands Group: Base/Utilities License: BSD-2.0 diff --git a/toys/pending/dhcpd.c b/toys/pending/dhcpd.c index 2adc60d..ffa812e 100644 --- a/toys/pending/dhcpd.c +++ b/toys/pending/dhcpd.c @@ -511,7 +511,6 @@ static int setup_signal() int flags = fcntl(sigfd.wr, F_GETFL); fcntl(sigfd.wr, F_SETFL, flags | O_NONBLOCK); signal(SIGUSR1, signal_handler); - signal(SIGTERM, signal_handler); return 0; } @@ -1713,8 +1712,8 @@ void dhcpd_main(void) waited += (unsigned) time(NULL) - timestmp; continue; } - dbg("Don't wait on Error in select\n"); - exit(0); + dbg("Error in select wait again...\n"); + continue; } if (!retval) { // Timed out dbg("select wait Timed Out...\n"); @@ -1740,12 +1739,6 @@ void dhcpd_main(void) infomsg(infomode, "Received SIGUSR1"); (addr_version==AF_INET6)? write_lease6file() : write_leasefile(); continue; - case SIGTERM: - infomsg(infomode, "received sigterm"); - (addr_version==AF_INET6)? write_lease6file() : write_leasefile(); - unlink(gconfig.pidfile); - exit(0); - break; default: break; } } |