dash: Redirection operator <> should not truncate file

Bug #598054 reported by Andreas Bühmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dash (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: dash

The redirection operator <> shall open a file for reading and writing. It should not truncate the file as it does in dash:

dash -c 'echo foo > tmp; cat 0<> tmp'

Output: nothing; "tmp" has size 0 afterwards
Expected output: contents of file "tmp"; "tmp" still has size 4

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: dash 0.5.5.1-3ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Thu Jun 24 12:56:38 2010
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: dash

Revision history for this message
Andreas Bühmann (buehmann) wrote :
description: updated
Revision history for this message
Martin Pokorny (martin-truffulatree) wrote :

I'm able to confirm the described behavior, and I agree that the file should not be truncated in using read/write redirection.

Changed in dash (Ubuntu):
status: New → Confirmed
Revision history for this message
Jilles Tjoelker (jilles) wrote :

This was fixed in upstream in git commit 09363426739388813a53d63716d15163f6c43caf, March 2010.

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.