{
// only called when THREADED_RTS, but unconditionally
// compiled here because GHC.Conc depends on it.
{
// only called when THREADED_RTS, but unconditionally
// compiled here because GHC.Conc depends on it.
// Wake up the IO Manager thread by sending a byte down its pipe
if (io_manager_pipe >= 0) {
StgWord8 byte = (StgWord8)IO_MANAGER_WAKEUP;
// 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"); }
// Ask the IO Manager thread to exit
if (io_manager_pipe >= 0) {
StgWord8 byte = (StgWord8)IO_MANAGER_DIE;
// 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"); }