Exit process in forking error case to avoid systemd timeout 91/292491/2
authorYoungHun Kim <yh8004.kim@samsung.com>
Tue, 9 May 2023 04:18:26 +0000 (13:18 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Tue, 9 May 2023 05:21:29 +0000 (14:21 +0900)
Change-Id: Ib2d183daa28f48e12824f50ac78b989fac4627a2

packaging/mused.spec
server/src/muse_server_private.c

index 771d87f..b9c6d4a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mused
 Summary:    A multimedia daemon
-Version:    0.3.167
+Version:    0.3.168
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 1765591..926f97c 100644 (file)
@@ -781,9 +781,10 @@ void ms_fork(int *notify_fd)
                close(fds[1]);
                /* Read in a string from the pipe */
                if (read(fds[0], msg, sizeof(msg)) <= 0) {
-                       LOGE("Failed to read from a file descriptor [%d]", fds[0]);
+                       strerror_r(errno, err_msg, MUSE_MSG_LEN_MAX);
+                       LOGE("Failed to read from a file descriptor [%d] errno %d %s", fds[0], errno, err_msg);
                        close(fds[0]);
-                       return;
+                       exit(EXIT_FAILURE);
                }
                close(fds[0]);