|
From: NightStrike <nig...@gm...> - 2009-01-09 19:08:52
|
On Fri, Jan 9, 2009 at 1:33 PM, John Ratliff <web...@te...> wrote: > NightStrike wrote: >> On Thu, Jan 8, 2009 at 11:26 AM, John Ratliff <web...@te...> wrote: >> >>> I don't seem to have the command 'nice' in my msys. Does this command >>> exist on msys? Is there something similar I can do to change process >>> priority? >>> >>> I want to run mencoder in the background, but in the lowest possible >>> priority. If I use windows task manager to set the process to the lowest >>> priority, I can use the machine as needed without noticeable degradation >>> (i.e. my web browser is still immediately responsive). >>> >>> How can I do this from a bourne script in msys? >>> >> >> The "start" command that comes with windows is for this purpose. >> start /low xxxx.exe will do exactly what you want. See start /? for >> details. >> > Doesn't work if you use msys. Says "can't find /LOW". Don't know why, or > what /bin/start is, but I couldn't find any way to use this. > > Here's the command I tried: > > start /LOW oggenc2.exe -Q -b 96 -o audio.ogg audio.pcm > > That command fails when using msys-bourne, but works fine if i'm in cmd.exe. > > I tried to grab nice from cygwin, but if I use it from within msys, it > says can't change process priority. I'm using cygwin temporarily until I > can find a better solution. I considered rewriting my script as a > windows batch file, but I use the same script on linux, so I would > prefer to use a single bourne script. > > There is a Win32 function called SetPriority if I want to write my own > program. I'm going to keep looking for wheels for awhile before > inventing a new one. > > I found a program called Prio which is supposed to save the priorities > of processes you change in task manager and change them for you when > relaunched, but it didn't work for me. There's another one I think > called Process Priority Manager 2008, but it's not free, and not worth > even the $10 they want for it. > > Thanks for the suggestion. If you know how I can make start work in > msys, I'd love to hear it. That sounds like the ideal solution to me. $ cmd "/c start /low mycommandline" where '$' of course is your prompt, and you type the rest :) |