From: Antti Kantee Date: Tue, 20 Jan 2015 16:55:46 +0000 (+0100) Subject: be verbose about error and workaround slow console X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9bc666a119cb52fdf1cc2c0afc163f18d9d7b616;p=rumpuser-xen.git be verbose about error and workaround slow console In case the domu runs very quickly, there will be a complete failure to observe any output. Therefore, in case we exit with val != 0, sleep a bit. This is a cheap and dirty workaround. --- diff --git a/lib/emul.c b/lib/emul.c index e9bc299..7b3fdc1 100644 --- a/lib/emul.c +++ b/lib/emul.c @@ -96,7 +96,13 @@ void __dead _exit(int eval) { /* XXX this duplicates _app_main / callmain cleanup */ - minios_printk("\n=== _exit(%d) called ===\n", eval); + if (eval) { + minios_printk("\n=== ERROR: _exit(%d) called ===\n", eval); + /* XXX: work around the console being slow to attach */ + sleep(1); + } else { + minios_printk("\n=== _exit(%d) called ===\n", eval); + } _rumprun_deconfig(); _netbsd_fini(); minios_stop_kernel();