dash can hang when piping to a nonexistant program

Bug #1445544 reported by David Oostdyk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dash (Ubuntu)
New
Undecided
Unassigned

Bug Description

Dash (the thing that seems to be the default /bin/bash) seems to mishandle the following case which is easy to verify:

tail -f some_file | some_non_existant_program

Although dash correctly reports that some_non_existant_program is not found, 'tail' will stay running until it produces output, at which the write() will fail and tail will exit. Other than emitting output, there is no way to kill tail from that shell: ^C, ^Z, ^\, etc will not kill tail; it must be killed either from another terminal or by causing it to produce output (such as by appending to some_file).

Other shells (real bash, /bin/sh, zsh, etc.) that I have tested will correctly kill tail immediately and will not leave the shell hanging in an uninterruptible state.

Ubuntu 14.04 LTS

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.