Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* supernice on 3000/800S under OSF/1
@ 1994-08-21  1:41 b_duke
  0 siblings, 0 replies; only message in thread
From: b_duke @ 1994-08-21  1:41 UTC (permalink / 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-08-21  1:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-08-21  1:41 supernice on 3000/800S under OSF/1 b_duke

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