2019-09-28 21:15:15 +02:00
|
|
|
## Name
|
|
|
|
|
|
2020-02-28 11:45:19 +01:00
|
|
|
shbuf\_allow\_pid - allow another process to map a shareable buffer
|
2019-09-28 21:15:15 +02:00
|
|
|
|
|
|
|
|
## Synopsis
|
|
|
|
|
```**c++
|
|
|
|
|
#include <SharedBuffer.h>
|
|
|
|
|
|
2020-02-28 11:45:19 +01:00
|
|
|
int shbuf_allow_pid(int shbuf_id, pid_t peer_pid);
|
2019-09-28 21:15:15 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
2020-02-28 11:45:19 +01:00
|
|
|
Gives the process with PID `peer_pid` permission to map the shareable buffer with ID `shbuf_id`.
|
2019-09-28 21:15:15 +02:00
|
|
|
|
|
|
|
|
## Return value
|
|
|
|
|
|
|
|
|
|
On success, returns 0. Otherwise, returns -1 and `errno` is set.
|
|
|
|
|
|
|
|
|
|
## Errors
|
|
|
|
|
|
2020-02-28 11:45:19 +01:00
|
|
|
* `EINVAL`: `peer_pid` is invalid, or `shbuf_id` is not a valid ID.
|
|
|
|
|
* `EPERM`: The calling process does not have access to the buffer with `shbuf_id`.
|
2019-09-28 21:15:15 +02:00
|
|
|
* `ESRCH`: No process with PID `peer_pid` is found.
|
2019-10-02 22:39:45 +03:00
|
|
|
|
|
|
|
|
## See also
|
|
|
|
|
|
2020-02-28 11:45:19 +01:00
|
|
|
* [`shbuf_create`(2)](shbuf_create.md)
|