diff options
author | William Jon McCann <jmccann@redhat.com> | 2008-03-06 17:53:53 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2008-03-06 17:53:53 +0000 |
commit | 3618dccd36e228c73a1449994b07f2e5cf9ae2b0 (patch) | |
tree | f6499c411528f2dd755c7773556111562b184ff4 /common | |
parent | a5202b5af535dd1efcf2d4687e03ce631ebb520d (diff) | |
download | gdm-3618dccd36e228c73a1449994b07f2e5cf9ae2b0.tar.gz |
Cast the signal number to a byte before sending over the pipe. Patch from:
2008-03-06 William Jon McCann <jmccann@redhat.com>
* common/gdm-signal-handler.c (signal_handler): Cast the signal
number to a byte before sending over the pipe.
Patch from: David Woodhouse <dwmw2@redhat.com>
svn path=/trunk/; revision=5941
Diffstat (limited to 'common')
-rw-r--r-- | common/gdm-signal-handler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/gdm-signal-handler.c b/common/gdm-signal-handler.c index ca1c9e78..0ab8cdb4 100644 --- a/common/gdm-signal-handler.c +++ b/common/gdm-signal-handler.c @@ -220,6 +220,7 @@ signal_handler (int signo) { static int in_fatal = 0; int ignore; + guchar signo_byte = signo; /* avoid loops */ if (in_fatal > 0) { @@ -244,12 +245,11 @@ signal_handler (int signo) g_warning ("Caught signal %d, shutting down abnormally. Generating backtrace...", signo); gdm_signal_handler_backtrace (); - ignore = write (signal_pipes [1], (guchar *)&signo, 1); + ignore = write (signal_pipes [1], &signo_byte, 1); break; default: --in_fatal; - /* FIXME: should probably use int32 here */ - ignore = write (signal_pipes [1], (guchar *)&signo, 1); + ignore = write (signal_pipes [1], &signo_byte, 1); break; } } |