From rwatson@tislabs.com  Tue Feb 27 14:30:54 2001
Return-Path: <rwatson@tislabs.com>
Received: from sentry.gw.tislabs.com (sentry.gw.tislabs.com [192.94.214.100])
	by hub.freebsd.org (Postfix) with ESMTP id BC09F37B71B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Feb 2001 14:30:50 -0800 (PST)
	(envelope-from rwatson@tislabs.com)
Received: by sentry.gw.tislabs.com; id QAA28899; Tue, 27 Feb 2001 16:40:05 -0500 (EST)
Received: from sproing.gw.tislabs.com(10.33.40.80) by sentry.gw.tislabs.com via smap (V5.5)
	id xma028865; Tue, 27 Feb 01 16:39:58 -0500
Received: (from rwatson@localhost)
	by sproing.gw.tislabs.com (8.11.2/8.11.2) id f1RLe0401051;
	Tue, 27 Feb 2001 16:40:00 -0500 (EST)
	(envelope-from rwatson)
Message-Id: <200102272140.f1RLe0401051@sproing.gw.tislabs.com>
Date: Tue, 27 Feb 2001 16:40:00 -0500 (EST)
From: rwatson@freebsd.org
Reply-To: rwatson@freebsd.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: csh "nice" command does not behave in sync with usr.bin/nice
X-Send-Pr-Version: 3.113

>Number:         25436
>Category:       bin
>Synopsis:       csh builtin nice behaves improperly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 27 14:40:01 PST 2001
>Closed-Date:    Thu Mar 15 16:01:19 PST 2001
>Last-Modified:  Thu Mar 15 16:01:41 PST 2001
>Originator:     
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
NAI Labs
>Environment:
System: FreeBSD sproing.gw.tislabs.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue Feb 27 15:45:03 EST 2001 rwatson@sproing.gw.tislabs.com:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:

First off, the csh "nice" command has a different syntax than nice(1),
as it uses a "+prio" instead of "prio" interface.  This is probably
acceptable as it is documented that way in the csh man page, as confusing
as users may find that.

However, what does worry me is that the csh nice command doesn't appear to
work properly, and report errors correctly.

>How-To-Repeat:

(using tcsh as shell)
sproing:~> nice -10 cat /dev/sndstat
FreeBSD Audio Driver (newpcm) Feb 27 2001 15:39:57
Installed devices:
pcm1: <CS423x> at io 0x534 irq 5 drq 1:0 (1p/1r channels duplex)
sproing:~> nice +10 cat /dev/sndstat
FreeBSD Audio Driver (newpcm) Feb 27 2001 15:39:57
Installed devices:
pcm1: <CS423x> at io 0x534 irq 5 drq 1:0 (1p/1r channels duplex)
sproing:~> /usr/bin/nice -10 cat /dev/sndstat
FreeBSD Audio Driver (newpcm) Feb 27 2001 15:39:57
Installed devices:
pcm1: <CS423x> at io 0x534 irq 5 drq 1:0 (1p/1r channels duplex)
sproing:~> /usr/bin/nice --10 cat /dev/sndstat
nice: setpriority: Permission denied

I.e., the csh built-in nice failed to report the failure of the "nice -10"
to set a low nice level.  Maybe this is a feature...?

>Fix:

>Release-Note:
>Audit-Trail:

From: Dima Dorfman <dima@unixfreak.org>
To: rwatson@freebsd.org
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/25436: csh "nice" command does not behave in sync with usr.bin/nice 
Date: Tue, 27 Feb 2001 20:10:44 -0800

 > 
 > >Number:         25436
 > >Category:       bin
 > >Synopsis:       csh builtin nice behaves improperly
 > 
 > However, what does worry me is that the csh nice command doesn't appear to
 > work properly, and report errors correctly.
 
 It works, it just doesn't report errors; it throws away the return
 value from setpriority(2).  I can send patches for this, but that
 would mean taking off three or four files off the vendor branch.  Is
 tcsh actively maintained?  If so, where should patches be submitted
 to?  Anyone?
 
 Regards
 
 					Dima Dorfman
 					dima@unixfreak.org

From: Dima Dorfman <dima@unixfreak.org>
To: rwatson@freebsd.org
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/25436: csh "nice" command does not behave in sync with usr.bin/nice
Date: Wed, 14 Mar 2001 21:48:17 -0800

 > [ csh builtin nice doesn't check return value of setpriority(2) ]
 
 This has been fixed in the tcsh repository by Christos Zoulas.
 FreeBSD will pick up the change the next time tcsh is imported.  Do
 you want to keep this PR open until then, or should I close it?
 
 Thanks
 
 					Dima Dorfman
 					dima@unixfreak.org
 

From: Robert Watson <rwatson@freebsd.org>
To: Dima Dorfman <dima@unixfreak.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/25436: csh "nice" command does not behave in sync with usr.bin/nice
Date: Thu, 15 Mar 2001 07:39:58 -0500 (EST)

 Closing it is fine, thanks!
 
 
 
 Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
 robert@fledge.watson.org      NAI Labs, Safeport Network Services
 
 On Wed, 14 Mar 2001, Dima Dorfman wrote:
 
 > > [ csh builtin nice doesn't check return value of setpriority(2) ]
 > 
 > This has been fixed in the tcsh repository by Christos Zoulas.
 > FreeBSD will pick up the change the next time tcsh is imported.  Do
 > you want to keep this PR open until then, or should I close it?
 > 
 > Thanks
 > 
 > 					Dima Dorfman
 > 					dima@unixfreak.org
 > 
 > 
 
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Thu Mar 15 16:01:19 PST 2001 
State-Changed-Why:  
Fixed in the tcsh repo; FreeBSD will pick it up with the next update. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25436 
>Unformatted:
