Tag

pipe

1 views collected around this technical thread.

Python Programming Learning Circle
Python Programming Learning Circle
Dec 7, 2021 · Fundamentals

Handling Subprocess Pipe Buffer Limits and Avoiding Deadlocks in Python

This article explains why Python's subprocess.Popen can deadlock when the child process writes more data than the system pipe buffer (typically 4 MiB), and demonstrates practical solutions such as avoiding PIPE, using communicate(), and streaming output with StringIO to prevent the blockage.

communicatedeadlockpipe
0 likes · 6 min read
Handling Subprocess Pipe Buffer Limits and Avoiding Deadlocks in Python
Code Ape Tech Column
Code Ape Tech Column
Feb 9, 2021 · Backend Development

Optimizing Java File Compression: From Buffered Streams to NIO Channels and Memory‑Mapped Files

This article demonstrates how to improve Java file compression performance by replacing unbuffered FileInputStream with BufferedInputStream, then leveraging NIO Channels, transferTo, memory‑mapped files, and Pipe, showing step‑by‑step code examples and timing results that reduce processing time from 30 seconds to about 1 second.

Buffered StreamsJavaMemory-Mapped Files
0 likes · 11 min read
Optimizing Java File Compression: From Buffered Streams to NIO Channels and Memory‑Mapped Files
Taobao Frontend Technology
Taobao Frontend Technology
Sep 14, 2020 · Backend Development

Why Node.js Child Processes Hang: Understanding stdio, Pipes, and Data Consumption

This article explains how Node.js child_process.spawn handles stdio options, why failing to attach 'data' listeners or consume pipe streams can cause the child to block, and demonstrates experiments, debugging techniques, and proper configuration such as using 'ignore' or 'pipe' to avoid deadlocks.

Node.jsUnix Domain Socketchild_process
0 likes · 13 min read
Why Node.js Child Processes Hang: Understanding stdio, Pipes, and Data Consumption
NetEase Game Operations Platform
NetEase Game Operations Platform
Sep 21, 2019 · Backend Development

Investigation of Subprocess Pipe Blocking in a Python Agent

The article analyzes a rare blocking issue in a Python Agent where a subprocess created via subprocess.Popen hangs due to an unclosed pipe inherited by a forked child process, demonstrates debugging steps using thread frames and lsof, and provides a reproducible example and mitigation recommendations.

Pythondebuggingfork
0 likes · 10 min read
Investigation of Subprocess Pipe Blocking in a Python Agent