Locate signal handler at head of the loop 06/267806/4 submit/tizen_6.5/20211210.071119
authorjiung-yu <jiung.yu@samsung.com>
Fri, 10 Dec 2021 03:21:42 +0000 (12:21 +0900)
committerjiung-yu <jiung.yu@samsung.com>
Fri, 10 Dec 2021 04:34:08 +0000 (13:34 +0900)
Description:
toybox dhcpd daemon have some problem when it receives SIGTERM.
When it occurs, dhcpd can't be killed and CPU usage rises up to 100%

Change-Id: I6499f0fc8a8554737c9982b4eaf1125e99eed52b
Signed-off-by: Yu jiung <jiung.yu@samsung.com>
toys/pending/dhcpd.c

index e30c249..1fc2e87 100644 (file)
@@ -1733,7 +1733,7 @@ void dhcpd_main(void)
       unsigned char sig;
       if (read(sigfd.rd, &sig, 1) != 1) {
         dbg("signal read failed.\n");
-        continue;
+        exit(0);
       }
       switch (sig) {
         case SIGUSR1: