#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/neutrino.h>
#include <process.h>

int main() {
    int chid;
    int pid2, pid3;
    char msg[256];

    chid = ChannelCreate(0);
    pid2 = spawnl(P_NOWAIT, "./M2", "./M2", itoa(chid), NULL);
    pid3 = spawnl(P_NOWAIT, "./M3", "./M3", itoa(chid), NULL);

    MsgReceive(chid, msg, sizeof(msg), NULL);
    printf("%s\n", msg);

    MsgReceive(chid, msg, sizeof(msg), NULL);
    printf("%s\n", msg);

    return 0;
}
