diff --git a/src/core/main.c b/src/core/main.c
index 8ef856e..4f74383 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -377,7 +377,8 @@ sigterm_handler (int signum)
 {
   if (sigterm_pipe_fds[1] >= 0)
     {
-      write (sigterm_pipe_fds[1], "", 1);
+      if ( write (sigterm_pipe_fds[1], "", 1) == -1 )
+        g_printerr ("metacity: write to sigterm_pipe failed.\n");
       close (sigterm_pipe_fds[1]);
       sigterm_pipe_fds[1] = -1;
     }
