1

Issue when fork()ing processes

view story
linux-howto

http://www.unix.com – Hi guys! I'll simplify my problem. I have the following code: Code: #include <fcntl.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <signal.h> #include <fcntl.h> #include <unistd.h> #include <sys/wait.h> #define max 25 #define buffdim 50 void p1(); void p2(); void wait_child(); void done(int sinal); int main(int argc, char** argv) { int pid[1], i,j;     for (i = 0; i < 2; i++)     {         pid[i] = fork();         if(pid[i]==0)       (HowTos)