dimi67
asked on
using fork(),wait() etc in devcpp
how can I "connect" devcpp with the libraries of linux unistd.h, sys/wai.h etc, in order to run peograms with system calls like fork(),wait(),exec() etc?
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
#include <unistd.h>
#include <sys/wait.h>
pid_t p;
p=fork();
if( p==0 ){
/* child */
}else if( p > 0 ){
/* parent */
int status;
wait(&status);
}else{
/* error */
}