From: PAULO_MAXIMILIANO_VASQUEZ_BRICHETTI DOT REPSOL AT email DOT ypf DOT com DOT ar X-Lotus-FromDomain: YPF_SA To: djgpp AT delorie DOT com Message-ID: <0325699D.00641DA2.00@email.ypf.com.ar> Date: Mon, 20 Nov 2000 15:14:36 -0300 Subject: function fork() Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline Reply-To: djgpp AT delorie DOT com I've some problem with function fork. In the code below the fork call always give -1. Could someone tell me if i'm doing something wrong? Thankx for your help #include #include int sum; main() { int i; sum = 0; printf("The fork value is: %d\n",fork()); for (i = 1; i <= 10; i++) { printf("El valor de i es %d\n", i); fflush(stdout); sum += i; } printf("The total is %d\n", sum); exit(0); } Maximiliano Vasquez