Newsgroups: comp.unix.xenix.sco Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!usenet.ins.cwru.edu!ncoast!ramsey From: ramsey@NCoast.ORG (Cedric Ramsey) Subject: Forking a process in 'C' Organization: North Coast Public Access *NIX, Cleveland, OH Date: Sat, 22 Sep 90 21:55:24 GMT Message-ID: <1990Sep22.215524.1587@NCoast.ORG> Hello people. I wanted to fork a process in 'C' here's the program: main () { int status; /* create a new process */ if (fork() == 0) { /* overlay new process with a different program via 'exec' */ execlp (...); } /* sleep until child has terminated */ wait(&status); return (0); } The problem ? The program goes into an infinite loop at the wait statement. It simply never return. What am i doing wrong ? THankyou All !