diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-03-22 19:53:19 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-03-22 19:53:19 +0000 |
commit | 1c45176f3b9be75b5c4744d9ef074430bf034e3f (patch) | |
tree | 3c0cb0a321385b336b6b76928a578940d0d43633 /rts/posix | |
parent | 30554cc82c2aeec64b03495048a650a3c0443d3c (diff) | |
download | haskell-1c45176f3b9be75b5c4744d9ef074430bf034e3f.tar.gz |
check return value of write (quiets gcc)
Diffstat (limited to 'rts/posix')
-rw-r--r-- | rts/posix/Signals.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c index 6d5ef43278..c1ffb5d2cf 100644 --- a/rts/posix/Signals.c +++ b/rts/posix/Signals.c @@ -102,20 +102,24 @@ setIOManagerPipe (int fd) void ioManagerWakeup (void) { + int r; // Wake up the IO Manager thread by sending a byte down its pipe if (io_manager_pipe >= 0) { StgWord8 byte = (StgWord8)IO_MANAGER_WAKEUP; - write(io_manager_pipe, &byte, 1); + r = write(io_manager_pipe, &byte, 1); + if (r == -1) { sysErrorBelch("ioManagerWakeup: write"); } } } void ioManagerDie (void) { + int r; // Ask the IO Manager thread to exit if (io_manager_pipe >= 0) { StgWord8 byte = (StgWord8)IO_MANAGER_DIE; - write(io_manager_pipe, &byte, 1); + r = write(io_manager_pipe, &byte, 1); + if (r == -1) { sysErrorBelch("ioManagerDie: write"); } close(io_manager_pipe); io_manager_pipe = -1; } |