ESTRPIPE
Linux / POSIXERRORNotableIPCHIGH confidence

Streams Pipe Error

Production Risk

STREAMS-specific; handle like EPIPE for regular pipes.

What this means

ESTRPIPE (errno 86) is a STREAMS-specific error returned when a STREAMS pipe operation fails, typically because a write was attempted on a pipe with no readers.

Why it happens
  1. 1Write to a STREAMS pipe with no readers
  2. 2STREAMS pipe broken
How to reproduce

Write to a STREAMS pipe with no active reader.

trigger — this will error
trigger — this will error
// Write to STREAMS pipe with no reader
putmsg(fd, NULL, &data, 0);
// Returns -1, errno = ESTRPIPE

expected output

Streams pipe error (ESTRPIPE)

Fix

Ensure the reader process is running

WHEN When writing to a STREAMS pipe

Ensure the reader process is running
// Check if reader is still alive before writing
// Use poll() to detect if pipe has readers
struct pollfd pfd = { .fd = fd, .events = POLLOUT };
if (poll(&pfd, 1, 0) == 1 && (pfd.revents & POLLHUP)) {
  // No readers — pipe broken
}

Why this works

POLLHUP on a pipe fd indicates no readers remain.

Sources
Official documentation ↗

Linux Programmer Manual errno(3)

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All Linux / POSIX errors