[metacity] If writing fails when handling SIGTERM, log an error. Closes #603510.
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] If writing fails when handling SIGTERM, log an error. Closes #603510.
- Date: Sat, 15 Jan 2011 23:15:10 +0000 (UTC)
commit 5389959edc3372fe43caf2230f6922c35c8b04e6
Author: Christian Kirbach <Christian Kirbach googlemail com>
Date: Sat Jan 15 18:14:31 2011 -0500
If writing fails when handling SIGTERM, log an error. Closes #603510.
This fixes a problem that was already separately fixed by Thomas,
in commit 575f5, but it does it more elegantly.
src/core/main.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index e7256c9..4f74383 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -377,9 +377,8 @@ sigterm_handler (int signum)
{
if (sigterm_pipe_fds[1] >= 0)
{
- int dummy;
-
- dummy = 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]