2022-04-11 15:03 (UTC+0200), Antonio Di Bacco:
> I did a short program where a  primary (--file-prefix=p1) allocates a
> memzone and generates a file descriptor that is passed to another primary
> (--file-prefix=p2) .
> The process P2 tries to mmap the memory but I get an error (Bad file
> descriptor):
> 
>         uint64_t* addr = mmap(NULL, 1024*1024*1024, PROT_READ, flags,
> mem_fd, 0);
>         if (addr == -1)
>             perror("mmap");

How do you pass the FD?
Memif does the same thing under the hood, so you should be able too.

Reply via email to