Date: Wed, 28 May 1997 16:25:49 +0200 (MET DST) From: Zahemszky Gabor <zgabor@CoDe.hu> To: freebsd-questions@freebsd.org (FreeBSD questions) Cc: ahill@interconnect.com.au Subject: Re: nice Message-ID: <199705281425.QAA00376@CoDe.hu> In-Reply-To: <Pine.BSI.3.91.970528140130.4231A-100000@tulpi.interconnect.com.au> from Anthony Hill at "May 28, 97 02:04:39 pm"
index | next in thread | previous in thread | raw e-mail
> On Tue, 27 May 1997, Wayne Baety wrote:
>
> >
> > Is there a way to have all of a users programs automatically run at a
> > certain nice level?
>
> I havent tried this but maybe you could nice the shell the user is
> dropped into at login time by changing his passwd file. ie set his shell
> to /usr/bin/nice -5 /usr/bin/sh
Hm. Change his/her shell to an executable script, which contains this line.
In your way, you get: "/usr/bin/nice -5 /usr/bin/sh": no shell - or
something like this
But:
what about this one:
in /etc/profile (or in /etc/csh.login) make a big case (switch) statement,
eg:
case "$LOGNAME" in # maybe use "$USER"
user1withLowPrio|user2withLowPrio|...) # the users, who need lower priority
renice <priority> -p $$
;;
*) # anybody else
: nothing, only for convenience
;;
esac
That's it.
Gabor
--
#!/bin/ksh
Z='21N16I25C25E30, 40M30E33E25T15U!' ;IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set $Z;for i { [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set $Z;X=;for i { [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;X="$X $i";typeset +l i;};print "$X"
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705281425.QAA00376>
