Predmet:Re: Programiranje pod Linuxom
Primjer:
PreuzmiIzvorni kôd (C#):#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int main(int argc, char *argv[])
{
pid_t child;
int status;
child = fork();
if (child == 0) {
printf(“unutar child proccesa\n”);
execl(“/bin/ls”, “/bin/ls”, NULL);
} else {
printf(“unutar parent procesa\n”);
waitpid(child, &status, 0);
}
return 0;
}
Podrška samo putem foruma, jer samo tako i ostali imaju koristi od toga.