Project

General

Profile

Actions

Bug #3927

closed

yes(1) needs error handling to avoid spinning

Added by Robert Mustacchi almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
2013-07-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

From the Joyent bug report:

yes(1) currently ignores all return values, which with a somewhat contrived example makes it spin indefinitely

#!/bin/sh

trap '' PIPE

mkfifo foo

yes >>foo &
head -n 3 foo

Whilst contrived, I did hit this problem with the pkgsrc pbulk software, which forgot to reset a SIGPIPE handler for child processes, resulting in a yes(1) call in a configure script hanging the entire build.

Both BSD and GNU yes(1) do not have this behaviour, so I think it reasonable to fix this.

Actions #1

Updated by Robert Mustacchi almost 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
  • Tags deleted (needs-triage)

Resolved in 96aa4f28c45f26c5cb5f5eb8bf23cb7fc6991d8f.

Actions

Also available in: Atom PDF