📄 init.c
字号:
#include <sys\types.h>
#include <null.h>
#include <stdio.h>
#include <jazmyn.h>
int main()
{
printf("Init process started\n");
printf("Init is forking a new process for Shell\n");
int pid = fork();
int i,j;
const char *argv[] ={"hello","world",0};
if(pid == 0)
{
execve("shell.com",argv,NULL);
}
printf("[ Init ]: waiting for a child to die\n");
_wait:
i = wait(&j);
printf("process died\n");
goto _wait;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -