libc: refactoring

This commit is contained in:
2019-11-28 02:35:52 +01:00
parent f104c46858
commit 4067cb45cb
75 changed files with 596 additions and 355 deletions

View File

@@ -27,8 +27,8 @@ main() {
if (pid == 0) {
printf("\nI am the new child!\n\n");
write(p[1], "", 1);
close(p[1]);
close(p[0]);
sys_close(p[1]);
sys_close(p[0]);
for(;;){
/* loop for ever */
printf(".");
@@ -41,8 +41,8 @@ main() {
printf("sync read");
exit(EXIT_FAILURE);
}
close(p[1]);
close(p[0]);
sys_close(p[1]);
sys_close(p[0]);
printf("\nPARENT: sending SIGINT\n\n");
kill(pid,SIGINT);
do {