28 lines
450 B
C
28 lines
450 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
#include <sys/shm.h>
|
|
#include <sys/wait.h>
|
|
#include <string.h>
|
|
#include "dijkstra.h"
|
|
#include "commun.h"
|
|
|
|
int main () {
|
|
if (fork() == 0)
|
|
{
|
|
execlp("./p1","./p2",NULL);
|
|
}
|
|
if (fork() == 0)
|
|
{
|
|
execlp("./p2","./p2",NULL);
|
|
}
|
|
if (fork() == 0)
|
|
{
|
|
execlp("./p3","./p3",NULL);
|
|
}
|
|
wait(NULL);
|
|
wait(NULL);
|
|
wait(NULL);
|
|
return 0;
|
|
}
|