NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/51114: /bin/sh "jobs" command incorrectly displays >&- and >&N where N > 9



>Number:         51114
>Category:       bin
>Synopsis:       /bin/sh "jobs" command incorrectly displays >&- and >&N where N > 9
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 03 16:50:00 +0000 2016
>Originator:     Robert Elz
>Release:        NetBSD 7.99.26 (all to date/time of PR)
>Organization:
>Environment:
System: NetBSD andromeda.noi.kre.to 7.99.26 NetBSD 7.99.26 (VBOX64-1.1-20160128) #43: Thu Jan 28 16:09:08 ICT 2016 kre%onyx.coe.psu.ac.th@localhost:/usr/obj/current/kernels/amd64/VBOX64 amd64
Architecture: x86_64
Machine: amd64
>Description:
	when running a background job that contains >&- (or <&-) or
	>& N (or <& etc) (where N > 9) the "jobs" command fails to
	display the redirection correctly.

>How-To-Repeat:
	$ exec 12>&1
	$ sleep 10 2>&- >&12 &
	$ jobs
	[1] + Running                 sleep 10 2>&/ >&<

	Notice that '/' == '0'-1  and '<' == '0'+12 and you get
	a hint as to the cause of the problem...

>Fix:
	Coming soon to a shell near you.



Home | Main Index | Thread Index | Old Index