[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

setpriority problem (tidl: nice problem)



Jeg fik ingen hjælp fra teknik listen hvor jeg spurgte omdet
samme d. 10. marts, så jeg prøver her.

Jeg bruger xbuffy som mail notifyer. Den nicer sig selv til 15.
Fint.

Når jeg midterklikker på den starter den mutt. Problemet er
at nu er mutt også nicet, og det er `vi' også, når jeg redigerer
et brev. Det er noget skidt da den har lavere prioritet end
setiathome som jeg kører på begge CPU'er. "audio play" må
gerne have lav prioritet ligesom xbuffy, det må mutt og vi
ikke. Men en almindelig bruger må ikke sætte sin prioritet op.
Hvad gør jeg så?

Her er en del af min .xbuffy:

box Maildir
title default
command rxvt -title "tfj-mutt" -e "mutt"&
audio play /usr/share/enlightenment/themes/ShinyMetal/snd/Doink.wav
led 1 2

Jeg har prøvet at resette nice værdien til normal, men får en
permission denied:
command --adjustment=-15 rxvt -title "tfj-mutt" -e "mutt"&

Hvad gør jeg? Det hjælper betydeligt hvis jeg logger ind som
root og siger
renice -15 -p `pidof mutt`
renice -15 -p `pidof vi`

Men det er en elendig "løsning".

Her er den "kode" der sætter prioriteten i xbuffy.c. Den ligger
i bunden af main(), lige før den forker.

#ifdef HAS_SETPRIORITY
    if (setpriority(PRIO_PROCESS, 0, envPriority) == -1)
        perror("Proirity change Failed");
#endif

if (!data.nofork)
{
    /* put ourself in the background */
    switch (pid = fork())
    {
    case 0:
        XtAppMainLoop(app);     /* in child do the stuff */
        break;
    case -1:
        perror("Fork failure");
        XtAppMainLoop(app);     /* fork failed - carry on in the parent instead 
*/                                                                             
        break;
    default:
        exit(0);                /* ok its going we can stop now */
        break;
    }
}
else
    XtAppMainLoop(app);

} /* denne klampe er end-of-main */

Ifølge spec filen i rpm'en, fås distributionen på
ftp.virginia.edu:/pub/src/xbuffy/xbuffy-3.4.tar.gz

-- 
torben fjerdingstad        | linux-2.3.99-pre3/GNU/gnome-1.0
sslug@sslug        | linux får den op og stå


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *