dash persistent input duplication like "exec 20<&0" is broken

Bug #128730 reported by robinbryce
4
Affects Status Importance Assigned to Milestone
dash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: dash

dash 0.5.3-5ubuntu2
Ubuntu 7.04
Linux masham 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

The following script, which Ian Jackson may recognize, fails at line 3

#!/bin/sh
set -e
exec 20<&0
exec 21<&1
exec 22<&2
exec 2>/dev/tty >&2
exec </dev/tty
program="$1"; shift

My reading of http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html (2.7.5) says "exec 20<&0" is leagal for a POSIX sh.

Revision history for this message
robinbryce (robinbryce) wrote :

The script works if 7,8,9 are used in place of 20,21,22. Is dash being overly pedantic with regard to "non portable" descriptors ?

Revision history for this message
comotion (comotion) wrote :

I have opened a new bug for the wider set of dash incompatabilites at https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481

Revision history for this message
Daniel T Chen (crimsun) wrote :

It may seem that dash is being overly pedantic, but it isn't a bug.

Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

Closing as invalid, per Daniel T Chen's comment.

Changed in dash:
status: New → Invalid
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.