NetBSD Problem Report #51114

From kre@munnari.OZ.AU  Tue May  3 16:49:50 2016
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 783227A497
	for <gnats-bugs@www.NetBSD.org>; Tue,  3 May 2016 16:49:50 +0000 (UTC)
Message-Id: <201605031649.u43Gn3wa005384@andromeda.noi.kre.to>
Date: Tue, 3 May 2016 23:49:04 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@www.NetBSD.org
Subject: /bin/sh "jobs" command incorrectly displays >&- and >&N where N > 9
X-Send-Pr-Version: 3.95

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 03 16:50:00 +0000 2016
>Closed-Date:    Tue May 03 20:52:28 +0000 2016
>Last-Modified:  Tue May 03 20:52:28 +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:/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.

>Release-Note:

>Audit-Trail:
From: "Robert Elz" <kre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51114 CVS commit: src/bin/sh
Date: Tue, 3 May 2016 20:46:36 +0000

 Module Name:	src
 Committed By:	kre
 Date:		Tue May  3 20:46:35 UTC 2016

 Modified Files:
 	src/bin/sh: jobs.c

 Log Message:
 PR bin/51114 - print the correct values for >&- and >& N (N > 9)
 in output from the "jobs" command (and other places that use the
 same routines.)


 To generate a diff of this commit:
 cvs rdiff -u -r1.76 -r1.77 src/bin/sh/jobs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: kre@NetBSD.org
State-Changed-When: Tue, 03 May 2016 20:52:28 +0000
State-Changed-Why:
Bug fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.