A simple on-disk fixed length queue in the style of the Xen shared-memory-ring. In particular the producer and consumer APIs allow clients to control exactly when data is exposed to the consumer and removed from the queue.
First create a "block device"-- any file will do:
dd if=/dev/zero of=test.raw bs=10240 count=1Then initialise the ring in the file:
./main.native createThen start two shells, in one run:
./main.native produceand in the other
./main.native consumeThe producer takes input from stdin and puts it onto the ring, and the consumer takes entries from the ring and prints them to stdout.