[GXemul-devel] Patch: Fix console data loss due to interrupted writes
Status: Alpha
Brought to you by:
gavare
From: Andreas G. <gs...@gs...> - 2019-03-03 11:21:07
|
Hi, The NetBSD project runs automated tests of NetBSD/pmax and NetBSD/hpcmips hosted on gxemul virtual machines: http://releng.netbsd.org/b5reports/pmax/ http://releng.netbsd.org/b5reports/hpcmips/ The installation step of the tests has been randomly failing, and I have now tracked down the cause: parts of the gxemul console output are sometimes lost because write() system calls writing the console output to stdout are interrupted by SIGALRM. The following patch appears to fix the problem. --- src/old_main/timer.cc.orig 2018-12-07 06:29:22.000000000 +0000 +++ src/old_main/timer.cc @@ -229,6 +229,7 @@ void timer_start(void) memset(&saction, 0, sizeof(saction)); saction.sa_handler = timer_tick; + saction.sa_flags = SA_RESTART; sigaction(SIGALRM, &saction, NULL); |