2018-08-15 04:07:33 +03:00
|
|
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
|
|
* This file is part of ToaruOS and is released under the terms
|
2018-02-25 12:22:44 +03:00
|
|
|
* of the NCSA / University of Illinois License - see LICENSE.md
|
2018-05-01 11:12:56 +03:00
|
|
|
* Copyright (C) 2014-2018 K. Lange
|
2018-08-15 04:07:33 +03:00
|
|
|
*
|
|
|
|
* kdebug - Launch kernel shell
|
2018-02-25 12:22:44 +03:00
|
|
|
*/
|
2018-10-30 10:56:28 +03:00
|
|
|
#include <errno.h>
|
2018-12-10 12:44:34 +03:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <sys/sysfunc.h>
|
2018-02-25 12:22:44 +03:00
|
|
|
|
|
|
|
int main(int argc, char * argv[]) {
|
2018-12-10 12:44:34 +03:00
|
|
|
sysfunc(TOARU_SYS_FUNC_KDEBUG, NULL);
|
2018-02-25 12:22:44 +03:00
|
|
|
int status;
|
2018-10-30 10:56:28 +03:00
|
|
|
while (wait(&status)) {
|
|
|
|
if (errno == ECHILD) break;
|
|
|
|
}
|
2018-09-28 07:00:51 +03:00
|
|
|
return WEXITSTATUS(status);
|
2018-02-25 12:22:44 +03:00
|
|
|
}
|