[process][linux] Fix fillFromStatusWithContext() on systems with 128 bit signal masks.

This commit is contained in:
Jens Meißner 2021-04-13 21:24:39 +02:00
parent 79048ccbfa
commit fc074343f8
No known key found for this signature in database
GPG Key ID: 9C96DAF09AC0FC48
1 changed files with 15 additions and 0 deletions

View File

@ -935,30 +935,45 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error {
}
p.memInfo.Locked = v * 1024
case "SigPnd":
if len(value) > 16 {
value = value[len(value)-16:]
}
v, err := strconv.ParseUint(value, 16, 64)
if err != nil {
return err
}
p.sigInfo.PendingThread = v
case "ShdPnd":
if len(value) > 16 {
value = value[len(value)-16:]
}
v, err := strconv.ParseUint(value, 16, 64)
if err != nil {
return err
}
p.sigInfo.PendingProcess = v
case "SigBlk":
if len(value) > 16 {
value = value[len(value)-16:]
}
v, err := strconv.ParseUint(value, 16, 64)
if err != nil {
return err
}
p.sigInfo.Blocked = v
case "SigIgn":
if len(value) > 16 {
value = value[len(value)-16:]
}
v, err := strconv.ParseUint(value, 16, 64)
if err != nil {
return err
}
p.sigInfo.Ignored = v
case "SigCgt":
if len(value) > 16 {
value = value[len(value)-16:]
}
v, err := strconv.ParseUint(value, 16, 64)
if err != nil {
return err