Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <pthread.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <sys/neutrino.h>
- #include <sys/syspage.h>
- #include <iostream>
- using namespace std;
- int child;
- void* func(void*){
- char rmsg, msg = '';
- int rcvid = MsgReceive(child, NULL,0,0);
- printf("[serv]: received msg\n");
- MsgReply(rcvid, 0, NULL, 0);
- }
- int main(){
- int pid;
- int thread;
- child = ChannelCreate(0);
- pid = getpid();
- int fd = open ('taskOne.txt', O_CREAT + O_RDWR, 0666); //что за сатана
- write(fd, &pid, 4);
- write(fd, &child, 4);
- printf("Server: pid = %d; child = %d\n", pid, child);
- usleep(1000);
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement