summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/process.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 819d879a..073cf866 100644
--- a/src/process.c
+++ b/src/process.c
@@ -322,8 +322,9 @@ handle_signal (GIOChannel *source, GIOCondition condition, gpointer data)
pid_t pid;
Process *process;
- if (read (signal_pipe[0], &signo, sizeof (int)) < 0 ||
- read (signal_pipe[0], &pid, sizeof (pid_t)) < 0)
+ errno = 0;
+ if (read (signal_pipe[0], &signo, sizeof (int)) != sizeof (int) ||
+ read (signal_pipe[0], &pid, sizeof (pid_t)) != sizeof (pid_t))
{
g_warning ("Error reading from signal pipe: %s", strerror (errno));
return TRUE;