17#define IPC_MAX_BUFFER 4096
36 wr = write (wfd, msg,
len);
55 pf = fcntl (rfd, F_GETFL, 0);
56 if (pf < 0 && errno != EBADF)
59 fcntl (rfd, F_SETFL, pf | O_NONBLOCK);
93 if ((rc = close (context->
fd[0])) < 0)
95 if ((rc = close (context->
fd[1])) < 0)
135 if ((pc = calloc (1,
sizeof (*pc))) == NULL)
137 if (pipe (pc->
fd) == -1)
struct ipc_pipe_context * ipc_init_pipe(void)
initializes a new context. Do not use this method directly, use ipc_init of ipc.h instead.
int ipc_pipe_send(struct ipc_pipe_context *context, const char *msg, int len)
sends given msg via the given context. Do not use this method directly, use ipc_send of ipc....
int ipc_pipe_destroy(struct ipc_pipe_context *context)
destroys given context. Do not use this method directly, use ipc_destroy of ipc.h instead.
int ipc_pipe_close(struct ipc_pipe_context *context)
closes given context. Do not use this method directly, use ipc_close of ipc.h instead.
char * ipc_pipe_retrieve(struct ipc_pipe_context *context)
retrieves message from the given context. Do not use this method directly, use ipc_retrieve of ipc....