GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CHMAKE(3) libdill Library Functions CHMAKE(3)

chmake - creates a channel


#include <libdill.h>
int chmake(
    int chv[2]);

    

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.

In case of success the function returns 0. In case of error it returns -1 and sets errno to one of the values below.

EMFILE: The maximum number of file descriptors in the process are already open.
ENFILE: The maximum number of file descriptors in the system are already open.
ENOMEM: Not enough memory.


int ch[2];
int rc = chmake(ch);
if(rc == -1) {
    perror("Cannot create channel");
    exit(1);
}

    

chdone(3) chmake_mem(3) choose(3) chrecv(3) chsend(3) hclose(3)
libdill

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.