diff options
-rw-r--r-- | src/process.c | 2 | ||||
-rw-r--r-- | src/session.c | 11 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/process.c b/src/process.c index 75357db6..6f07e4e5 100644 --- a/src/process.c +++ b/src/process.c @@ -458,7 +458,7 @@ process_class_init (ProcessClass *klass) g_io_add_watch (g_io_channel_unix_new (signal_pipe[0]), G_IO_IN, handle_signal, NULL); action.sa_sigaction = signal_cb; sigemptyset (&action.sa_mask); - action.sa_flags = SA_SIGINFO; + action.sa_flags = SA_SIGINFO | SA_RESTART; sigaction (SIGTERM, &action, NULL); sigaction (SIGINT, &action, NULL); sigaction (SIGHUP, &action, NULL); diff --git a/src/session.c b/src/session.c index 2c05114f..15598425 100644 --- a/src/session.c +++ b/src/session.c @@ -404,14 +404,9 @@ static ssize_t read_from_child (Session *session, void *buf, size_t count) { ssize_t n_read; - while ((n_read = read (session->priv->from_child_output, buf, count)) < 0) - { - if (errno != EINTR) - { - l_warning (session, "Error reading from session: %s", strerror (errno)); - return n_read; - } - } + n_read = read (session->priv->from_child_output, buf, count); + if (n_read < 0) + l_warning (session, "Error reading from session: %s", strerror (errno)); return n_read; } |