Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: b_duke@lacebark.ntu.edu.au ()
Subject: supernice on 3000/800S under OSF/1
Date: 21 Aug 1994 01:41:53 GMT	[thread overview]
Message-ID: <336bd1$5mv@pellew.ntu.edu.au> (raw)

Hi folks,

A colleague wants to run supernice on a new 3000/800S under OSF/1 that
I am currently sysadmin of. I had the code on a IBM RS6K and it
compiled there OK. Sorry I can not remember where I got it from and
thus apologise for not giving credit to the author.

Under OSF/1 it fails to compile. The code and the error message is below.

/****************************************************************************
 * supernice.c
 * -----------
 *	A hack to set the priority of a process to 126.  So it will only
 * run on an empty machine.
 ****************************************************************************/
#include <sched.h>
#include <sys/types.h>
main(int argc,char **argv)
{
  setpri(getpid(),PRIORITY_MAX-1);
  seteuid(getuid());
  if (argc>1) execvp(argv[1],argv+1);
}

/usr/lib/cmplrs/cc/cfe: Error: supernice.c, line 11: 
'PRIORITY_MAX' undefined, reoccurrences will not be reported
   setpri(getpid(),PRIORITY_MAX-1);
 ------------------^

On the RS6K, PRIORITY_MAX is set in sched.h in /usr/include/sys. On
the DEC it is not. There is something called SCHED_PRID_RT_MAX set
to 63. Is this similar? 

Can anyone assist me in fixing this problem? Please e-mail and I will
post a summary.

Thanks, Brian.
--
        Associate Professor Brian Salter-Duke (Brian Duke)
School of Chemistry and Earth Sciences, Northern Territory University,
Box 40146, Casuarina, NT 0811, Australia.  Phone 089-466702
e-mail: b_duke@lacebark.ntu.edu.au  or b_duke@uncl04.ntu.edu.au


                 reply	other threads:[~1994-08-21  1:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox