From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e8356d7f3090e95a,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-08-20 19:04:43 PST Path: bga.com!news.sprintlink.net!hookup!swrinde!ihnp4.ucsd.edu!munnari.oz.au!pellew.ntu.edu.au!lacebark.ntu.edu.au!b_duke From: b_duke@lacebark.ntu.edu.au () Newsgroups: comp.unix.osf.osf1 Subject: supernice on 3000/800S under OSF/1 Date: 21 Aug 1994 01:41:53 GMT Organization: SCES, Northern Territory University, Australia Message-ID: <336bd1$5mv@pellew.ntu.edu.au> NNTP-Posting-Host: lacebark.ntu.edu.au X-Newsreader: TIN [version 1.2 PL2] 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 #include 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