BSD Ports

devel/p5-Atomic-Pipe 0.032 DragonFly

Send atomic messages from multiple writers across a POSIX pipe

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
ART10, GPLv1+
Categories
devel, perl5
Package size
35.4 KiB, 95.6 KiB installed

Description

Normally if you write to a pipe from multiple processes/threads, the messages will come mixed together unpredictably. Some messages may be interrupted by parts of messages from other writers. This module takes advantage of some POSIX specifications to allow multiple writers to send arbitrary data down a pipe in atomic chunks to avoid the issue.

NOTE: This only works for POSIX compliant pipes on POSIX compliant systems. Also some features may not be available on older systems, or some platforms.

Under the hood this module will split your message into small sections of slightly smaller than the PIPE_BUF limit. Each message will be sent as 1 atomic chunk with a 4 byte prefix indicating what process id it came from, what thread id it came from, a chunk ID (in descending order, so if there are 3 chunks the first will have id 2, the second 1, and the final chunk is always 0 allowing a flush as it knows it is done) and then 1 byte with the length of the data section to follow.

On the receiving end this module will read chunks and re-assemble them based on the header data. So the reader will always get complete messages. Note that message order is not guarenteed when messages are sent from multiple processes or threads. Though all messages from any given thread/process should be in order.

In the other systems

The newest version among them is 0.033, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
DragonFlydevel/p5-Atomic-Pipe0.032 behind since 2026-11-09none known-[email protected]-
FreeBSDdevel/p5-Atomic-Pipe0.033 newestnone known-[email protected]2026-11-09
HardenedBSDdevel/p5-Atomic-Pipe0.032 behind since 2026-11-09no data-[email protected]-
GhostBSDdevel/p5-Atomic-Pipe0.032 behind since 2026-11-09no data-[email protected]-

Version history 1

  1. 0.032

Upstream's version as each commit to the port's Makefile set it, or as this site first saw it in the system's packages; the tree's own revisions are not versions here.

Install

Binary package:

pkg install p5-Atomic-Pipe

From DPorts:

cd /usr/dports/devel/p5-Atomic-Pipe && make install clean

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

Run dependencies 2

No port depends on this one.