View Issue Details

IDProjectCategoryView StatusLast Update
00019401003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2025-08-28 16:45
ReporterAntonio Diaz Assigned To 
PrioritynormalSeverityObjectionTypeOmission
Status ResolvedResolutionAccepted As Marked 
NameAntonio Diaz
OrganizationGNU
User Reference
Sectioned
Page Number?
Line Number?
Interp Status---
Final Accepted Text0001940:0007239
Summary0001940: ed should ignore (or handle) SIGPIPE
DescriptionThe specification for ed states in section ASYNCHRONOUS EVENTS that:

"The ed utility shall take the standard action for all signals (...) with the following exceptions: SIGINT (...), SIGHUP (...), SIGQUIT (...)".

But ed should also ignore (or handle) SIGPIPE to prevent commands like 'w !:' (writing to a shell command that does not read (all of) its standard input) from abnormally terminating ed without saving the changes. GNU ed prevents such unwanted termination by ignoring SIGPIPE and detecting a broken pipe just as any other write error.
Desired ActionAdd to section ASYNCHRONOUS EVENTS something like the following:

SIGPIPE
    The ed utility shall ignore this event.
Tagsissue8, tc1-2024

Activities

geoffclare

2025-08-28 15:11

manager   bugnote:0007237

> GNU ed prevents such unwanted termination by ignoring SIGPIPE

Is this a recent change? I tried it with GNU ed 1.19 from Debian bookworm and it was terminated by SIGPIPE. Also got SIGPIPE on Solaris 11.4 and macOS.

I see that the standard says the behaviour on SIGPIPE for ex is unspecified, so perhaps we should do the same for ed.

geoffclare

2025-08-28 16:26

manager   bugnote:0007239

Last edited: 2025-08-28 16:45

Before Issue 8 page 2816 line 93355 section ed (ASYNCHRONOUS EVENTS), insert:
SIGPIPE
The behavior is unspecified.

Issue History

Date Modified Username Field Change
2025-08-16 16:33 Antonio Diaz New Issue
2025-08-16 16:33 Antonio Diaz Tag Attached: issue8
2025-08-28 15:11 geoffclare Note Added: 0007237
2025-08-28 16:26 geoffclare Note Added: 0007239
2025-08-28 16:27 geoffclare Status New => Resolved
2025-08-28 16:27 geoffclare Resolution Open => Accepted As Marked
2025-08-28 16:27 geoffclare Interp Status => ---
2025-08-28 16:27 geoffclare Final Accepted Text => 0001940:0007239
2025-08-28 16:27 geoffclare Tag Attached: tc1-2024
2025-08-28 16:45 geoffclare Note Edited: 0007239