lemonade
where dream meets reality
Categories: C | Add a Comment

simple.c – download link // named pipe // Firman Gautama #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/wait.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> int main(void) { int p, check, nilai; FILE *fp; // sebelum fork system(“clear”); check = mkfifo(“pipe”, 0666); if(check < 0) {   printf(“pipe gagaln”); exit(0); } // forking stuff p = fork(); […]

Categories: C | Add a Comment

simple.c – download link // unnamed pipe // Firman Gautama #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/wait.h> #include <sys/types.h> #include <string.h> int main(void) { int p, blah[2], check; int nilai; // sebelum fork check = pipe(blah); if(check < 0) {   printf(“pipe gagaln”); exit(0); } system(“clear”); // forking stuff p = fork(); if(p < 0) […]