Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!ncis!helios.ee.lbl.gov!pasteur!agate!bionet!csd4.milw.wisc.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!RICE.EDU!rich From: rich@RICE.EDU (Richard Murphey) Newsgroups: comp.windows.x Subject: Re: Better interactive performance Message-ID: <8901172251.AA08563@kappa.rice.edu> Date: 17 Jan 89 22:51:19 GMT References: Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 36 In article Dirk Grunwald writes: > When running X, emacs & latex on my sun-3/60, I notice a bit of a detail > in setting the focus. In particular, I can move the cursor from my emacs > window to an xterm window, type a few characters & have them appear > in the emacs window. > > Does anyone else have a solution, or perhaps a set of patches to TWM to > run ``niced'' but to fork children as ``normal''? You might look at the way GNU emacs handles reniceing itself. From the emacs distribution 18.52 in src/config.h: /* Define HIGHPRI as a negative number if you want Emacs to run at a higher than normal priority. For this to take effect, you must install Emacs with setuid root. Emacs will change back to the users's own uid after setting its priority. */ #define HIGHPRI -10 and in src/emacs.c: #ifdef HIGHPRI setpriority (PRIO_PROCESS, getpid (), HIGHPRI); setuid (getuid ()); #endif HIGHPRI Perhaps using this in the server would help you. On another note, I have noticed that running GNU emacs reniced -10 and either twm or Xsun at normal priority (0) results in both of them soaking up 50% of the CPU cycles. I don't know why, but running them on separate hosts cures it. Rich Murphey Electrical Engineering Rice University