FreeBSD Manual Pages
CHMAKE(3) libdill Library Functions CHMAKE(3) NAME chmake - creates a channel SYNOPSIS #include <libdill.h> int chmake( int chv[2]); DESCRIPTION Creates a bidirectional channel. In case of success handles to the both sides of the channel will be returned in chv parameter. A channel is a synchronization primitive, not a container. It doesn't store any items. chv: Out parameter. Two handles to the opposite ends of the channel. RETURN VALUE In case of success the function returns 0. In case of error it returns -1 and sets errno to one of the values below. ERRORS • EMFILE: The maximum number of file descriptors in the process are al- ready open. • ENFILE: The maximum number of file descriptors in the system are al- ready open. • ENOMEM: Not enough memory. EXAMPLE int ch[2]; int rc = chmake(ch); if(rc == -1) { perror("Cannot create channel"); exit(1); } SEE ALSO chdone(3) chmake_mem(3) choose(3) chrecv(3) chsend(3) hclose(3) libdill CHMAKE(3)
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | EXAMPLE | SEE ALSO
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=chmake&sektion=3&manpath=FreeBSD+Ports+15.0>
