Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!infopiz!lupine!bryant!glenn From: glenn@bryant.NCD.COM (Glenn Shapland) Newsgroups: comp.unix.ultrix Subject: Nice bug Message-ID: <4780@lupine.NCD.COM> Date: 2 Apr 91 00:04:45 GMT Sender: news@NCD.COM Reply-To: glenn@bryant.NCD.COM (Glenn Shapland) Lines: 37 I have an X application which starts up like a daemon using the following code. /* prevent reacquisition of a controlling terminal */ if (fork() != 0) exit(0); /* change process group */ if (setpgrp(0,getpid())== -1) PrintLogCon(msglog,"setpgrp failed [%s]\n",SYSERR); /* make sure we don't have a control terminal */ if ((ftty=open("/dev/tty",O_RDWR)) >= 0) { /* lose terminal */ ioctl(ftty,TIOCNOTTY,0); close(ftty); } /* close all open files */ for (ftty=0;ftty<_NFILE;++ftty) close(ftty); The problem is that when it first starts up it runs fine and looks like this with ps: mfg 10486 0.0 2.5 1812 488 ? S 0:00 station3b -display 138.43.2.6: but after some period of time (usually 24 hours) the load average of the system goes up and the application gets niced. If I try to manually un-nice the application the nice runs without complaining but has no effect. mfg 10486 7.8 1.3 2264 252 ? R N 875:54 station3b -display 138.43.2.6: The application does use a port on a DecServer 200. As in most X applications this process should be sitting in a select system call waiting for something to do. Has anyone seen similar symtoms or have any ideas that I could try? -glenn