Added buffer to the console

Added hotkeys to switch between console buffers and to return to the home one
Added clear screen command
Added debug text outputs to the hello command and when loading sh
This commit is contained in:
iDunnoDev
2022-12-09 10:39:55 +00:00
committed by iDunnoDev
parent 0ee33aaa97
commit 9b23ca2a45
194 changed files with 283 additions and 49519 deletions

View File

@ -5,20 +5,27 @@ int main(int argc, char *argv[]) {
//int consoles = 0;
int pid;
//char* comment = "";
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "-c") == 0) {
}
}
pid = fork();
pid = fork();
if (pid < 0) {
printf(1, "screen: fork failed\n");
}
if (pid == 0) {
exec("sh", argv);
printf(1, "screen: exec sh failed\n");
if (screen() != 0)
{
exec("sh", argv);
printf(1, "screen: exec sh failed\n");
}
else
{
printf(1, "screen: failed to create a new console\n");
}
}
exit();
}