se@ikp.uni-koeln.de (Stefan Esser) (09/04/90)
Archive-name: hpux-top/02-Sep-90 Original-posting-by: se@ikp.uni-koeln.de (Stefan Esser) Original-subject: Re: setpriority() in hpux? Archive-site: ftp.rrz.uni-koeln.de [134.95.128.215] Archive-directory: /pub/misc Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti) I have written a setpriority function that works well with top 2.5 on our hp9000s835. It patches the process's niceness in the proc area. I included all the security checks normally performed by the system call. Because it requires _write_-access to the kernel, top has to be installed setgid 'kmem' with /dev/kmem mode 660. (But I don't see how that could break security.) To port the setpriority code to your hp9000s300 should't be hard. The file is named '/pub/misc/top_hp.2.5.tar.Z' on 'ftp.rrz.uni-koeln.de'. The file '/pub/misc/top2.5.tar.Z' is the original version (without renice). You should be able to isolate my patches with a diff of these two files. Stefan Esser -- Stefan Esser, Institute of Nuclear Physics, University of Cologne, W. Germany se@ikp.Uni-Koeln.DE [134.95.192.9]