From owner-freebsd-questions Tue Jun 29 12:40:18 1999 Delivered-To: freebsd-questions@freebsd.org Received: from plab.ku.dk (plab.ku.dk [130.225.105.65]) by hub.freebsd.org (Postfix) with ESMTP id D709314D8F for ; Tue, 29 Jun 1999 12:40:14 -0700 (PDT) (envelope-from tobez@plab.ku.dk) Received: from lion.plab.ku.dk (lion.plab.ku.dk [130.225.105.49]) by plab.ku.dk (8.9.1/8.9.1) with ESMTP id VAA17057; Tue, 29 Jun 1999 21:40:13 +0200 (CEST) Received: (from tobez@localhost) by lion.plab.ku.dk (8.9.3/8.9.3) id VAA05225; Tue, 29 Jun 1999 21:38:04 +0200 (CEST) (envelope-from tobez) Date: Tue, 29 Jun 1999 21:38:04 +0200 From: Anton Berezin To: "Ronald 'Ko' Klop" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: permanent nice? Message-ID: <19990629213804.D4166@lion.plab.ku.dk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Ronald 'Ko' Klop on Tue, Jun 29, 1999 at 09:13:35PM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jun 29, 1999 at 09:13:35PM +0200, Ronald 'Ko' Klop wrote: > Is it possible to make an application start with nice -10 every time > when you're not root? Or better can root make an application always > start with nice -10. Also for the other users on the system? If you wrote the application or have the source available, man 3 nice man 2 setpriority If you don't, you can create a wrapper for the app (and install it instead of the application, moving the real thing into another location, if needed), like this one (untested): #! /usr/bin/perl -w use POSIX; POSIX::nice( 10) if $>; # i.e. if not root exec { '/usr/local/bin/application' } @ARGV or print STDERR $!; -- Anton Berezin The Protein Laboratory, University of Copenhagen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message