[process]freebsd: implementes proceess.Nice()

This commit is contained in:
WAKAYAMA shirou 2016-03-31 17:32:24 +09:00
parent 37b6b4051f
commit 37d8908841
2 changed files with 7 additions and 3 deletions

View File

@ -179,8 +179,8 @@ exe x x x
uids x x x
gids x x x
terminal x x x
io_counters x
nice x x x
io_counters x x
nice x x x x
num_fds x
num_ctx_switches x
num_threads x x x x

View File

@ -163,7 +163,11 @@ func (p *Process) Terminal() (string, error) {
return termmap[ttyNr], nil
}
func (p *Process) Nice() (int32, error) {
return 0, common.NotImplementedError
k, err := p.getKProc()
if err != nil {
return 0, err
}
return int32(k.Nice), nil
}
func (p *Process) IOnice() (int32, error) {
return 0, common.NotImplementedError