Skip to content

Commit

Permalink
Exit with the same signal as fake init
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Feb 2, 2018
1 parent 2aece87 commit ba5ab37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xX_main_Xx.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#include <signal.h>
#include <unistd.h>
#include "kernel/init.h"
#include "kernel/fs.h"

static void exit_handler(int code) {
exit(code >> 8);
if (code & 0xff)
raise(code & 0xff);
else
exit(code >> 8);
}

// this function parses command line arguments and initializes global
Expand Down

0 comments on commit ba5ab37

Please sign in to comment.