evas/cserve2: catch only SIGINT from cserve2
authorJean-Philippe Andre <jp.andre@samsung.com>
Fri, 11 Oct 2013 03:07:43 +0000 (12:07 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 28 Oct 2013 06:47:16 +0000 (15:47 +0900)
SIGTERM and SIGQUIT don't need to be caught.
the proper signal to ask cserve2 to exit cleanly is SIGINT.

enlightenment_start (or systemd) should be responsible for
restarting in case of crash / unexpected termination.

cserve2 will not restart if killed with signal SIGINT,
as it will then exit with return code 0 (normal)

src/bin/evas/evas_cserve2_main_loop_linux.c

index 18b4662..7f17618 100644 (file)
@@ -131,8 +131,6 @@ _signalfd_handler(int fd, Fd_Flags flags EINA_UNUSED, void *data EINA_UNUSED)
              _signal_handle_child(&sinfo);
              break;
            case SIGINT:
-           case SIGTERM:
-           case SIGQUIT:
              _signal_handle_exit(&sinfo);
              break;
            case SIGUSR1:
@@ -161,10 +159,8 @@ _signalfd_setup(void)
 
    sigemptyset(&mask);
    sigaddset(&mask, SIGCHLD);
-   sigaddset(&mask, SIGTERM);
-   sigaddset(&mask, SIGQUIT);
-   sigaddset(&mask, SIGUSR1);
-   sigaddset(&mask, SIGUSR2);
+   sigaddset(&mask, SIGUSR1); // ignored
+   sigaddset(&mask, SIGUSR2); // ignored
 
    if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
      {