From dfb0d84c8113629f1af0fa39519a38c4c48f7140 Mon Sep 17 00:00:00 2001 From: turret Date: Fri, 12 Jan 2024 19:41:15 +0000 Subject: init: add random seed & bug fixes --- init/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'init') diff --git a/init/init.c b/init/init.c index ad1e182..ecd3c25 100644 --- a/init/init.c +++ b/init/init.c @@ -92,6 +92,9 @@ int main(void) if(curl_global_init(CURL_GLOBAL_DEFAULT)) panic("init: curl init failed"); + /* init random seed */ + srand(time(NULL)); + /* Rest of the program.. */ do_initcalls(); @@ -112,7 +115,7 @@ int main(void) print(LOG_WARNING "init: failed to reap process %d", process); if(siginfo.si_status != 0) { - panic("init: process %d exited with non-zero status (%d)", siginfo.si_status); + panic("init: process %d exited with non-zero status (%d)", siginfo.si_pid, siginfo.si_status); } } else if(sig == SIGINT) { panic("init: keyboard interrupt"); -- cgit v1.2.3