mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-12 06:02:51 +00:00
This feels a lot more consistent and Unixy: create_shared_buffer() => shbuf_create() share_buffer_with() => shbuf_allow_pid() share_buffer_globally() => shbuf_allow_all() get_shared_buffer() => shbuf_get() release_shared_buffer() => shbuf_release() seal_shared_buffer() => shbuf_seal() get_shared_buffer_size() => shbuf_get_size() Also, "shared_buffer_id" is shortened to "shbuf_id" all around.
646 B
646 B
Name
shbuf_allow_pid - allow another process to map a shareable buffer
Synopsis
#include <SharedBuffer.h>
int shbuf_allow_pid(int shbuf_id, pid_t peer_pid);
Description
Gives the process with PID peer_pid
permission to map the shareable buffer with ID shbuf_id
.
Return value
On success, returns 0. Otherwise, returns -1 and errno
is set.
Errors
EINVAL
:peer_pid
is invalid, orshbuf_id
is not a valid ID.EPERM
: The calling process does not have access to the buffer withshbuf_id
.ESRCH
: No process with PIDpeer_pid
is found.