[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KProcess Nice level
From:       Luis Pedro Coelho <luis_pedro () netcabo ! pt>
Date:       2003-05-27 3:23:26
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le Lundi 26 Mai 2003 12:57, Oswald Buddenhagen a écrit :
> > Add a couple of priority constants as well (Priority::High,
> > Priority::Normal, Priority::Low, Priority::VeryLow) since the standard
> > 19 to -19 (or is it 20 to -19, or whatever) is not really friendly -
>
> i'm not sure this is a good idea. the programmer using the call should
> be familiar with the "nice scale".

Why?
Isn't it error prone?

I did say that:

> > there should be a way to specify the exact posix style value, of course.

and I still think that it is a good solution. Unix-style values are a really 
bad interface, IMHO, especially if you use them in a magic number style. Why 
not just add an enum with the most important values?

> the linux man page does not mention posix ...

Yes, you are right. Neither nice(3) nor setpriority talk about posix.

Perhaps it isn't posix, then. It is standard enough, though, as in those 
manpages the list of systems with the same syscall includes both the BSD and 
the AT&T trees.

The info cmdline-utility page (info:nice) seems to do. IIRC, the linux kernel 
actually uses a different scale internally, but the syscall does the math to 
convert.

> in fact, it seems like a possible todo to add some math for systems that
> use priorities outside the range -20 ... 19 (dunno if we support any of
> these systems, though).

As I said above, I think we should be safe in -20 .. 19.

Of course, no one really knows the exact meaning of the range. -20 is high 
priority, 0 normal, 19 very low; but the meaning of the values in between is 
a bit fuzzy.

Regards,
- -- 
Luis Pedro Coelho

The carrot tax, see:
http://luispedro.journalspace.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+0tozGpBAvyRwXdgRAphiAJ9w7E3/GvmmzNXykrdwzeXd9IM0wwCeN0c5
Wi8qX+a6vdDjF2CCNnws81Q=
=Z9w8
-----END PGP SIGNATURE-----
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic