支持cpiofs&&init能够监控进程的死亡

This commit is contained in:
zhangzheng
2023-12-09 23:11:55 +08:00
parent 9e7c1e08ee
commit 22c5c91734
44 changed files with 904 additions and 130 deletions

View File

@@ -8,6 +8,7 @@
#include <string.h>
#include <sys/time.h>
#include <pthread.h>
#include <errno.h>
int ls(int argc, char *agrv[])
{
DIR *dir;
@@ -43,14 +44,13 @@ int cat(int argc, char *argv[])
if ((fp = fopen(argv[1], "r")) == NULL)
{
return (-2);
return errno;
}
while ((c = fgetc(fp)) != EOF)
{
cons_write(&c, 1);
}
cons_write_str("\n");
fclose(fp);
return 0;