diff -ur watchdog-5.6/src/shutdown.c watchdog-5.6-cleanup/src/shutdown.c --- watchdog-5.6/src/shutdown.c 2009-03-21 19:08:53.000000000 +0000 +++ watchdog-5.6-cleanup/src/shutdown.c 2009-03-26 10:10:57.000000000 +0000 @@ -446,6 +446,8 @@ (void) killall5(SIGKILL); keep_alive(); + ssize_t write_len; + /* Record the fact that we're going down */ if ((fd = open(_PATH_WTMP, O_WRONLY | O_APPEND)) >= 0) { time_t t; @@ -458,7 +460,7 @@ wtmp.ut_pid = 0; wtmp.ut_type = RUN_LVL; wtmp.ut_time = t; - write(fd, (char *) &wtmp, sizeof(wtmp)); + write_len = write(fd, (char *) &wtmp, sizeof(wtmp)); close(fd); } @@ -474,7 +476,7 @@ char buf[512]; if (read(fd_seed, buf, 512) == 512) - write(fd_bck, buf, 512); + write_len = write(fd_bck, buf, 512); close(fd_bck); } close(fd_seed);