Exemple #1
0
Fichier : os.c Projet : 8l/inferno
void
cleanexit(int x)
{
	sleep(2);		/* give user a chance to see message */
	termrestore();
	ExitProcess(x);
}
Exemple #2
0
void
osreboot(char *file, char **argv)
{
	if(dflag == 0)
		termrestore();
	execvp(file, argv);
	error("reboot failure");
}
Exemple #3
0
Fichier : os.c Projet : 8l/inferno
void
osreboot(char *file, char **argv)
{
	if(rebootok){
		termrestore();
		execvp(file, argv);
		panic("reboot failure");
	}
}
Exemple #4
0
void
restore()
{

    /* restore the terminal */
    if(dflag == 0) {
        trace(TRACE_INFO, "node9/kernel: restoring terminal");
        termrestore();
    }

}
Exemple #5
0
void
cleanexit(int x)
{
	USED(x);

	if(up->intwait) {
		up->intwait = 0;
		return;
	}

	if(dflag == 0)
		termrestore();

	kill(0, SIGKILL);
	exit(0);
}
Exemple #6
0
Fichier : os.c Projet : 8l/inferno
int
readkbd(void)
{
	DWORD r;
	char buf[1];

	if(ReadFile(kbdh, buf, sizeof(buf), &r, 0) == FALSE)
		panic("keyboard fail");
	if (r == 0)
		panic("keyboard EOF");

	if (buf[0] == 0x03) {
		// INTR (CTRL+C)
		termrestore();
		ExitProcess(0);
	}
	if(buf[0] == '\r')
		buf[0] = '\n';
	return buf[0];
}