summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d0c4ed7)
use NODEV for ac_tty if proc had no controlling tty.
SCCS-vsn: sys/kern/kern_resource.c 4.9
- if (acctp) {
- u.u_error = EBUSY;
- return;
- }
ip = namei(uchar, 0, 1);
if(ip == NULL)
return;
ip = namei(uchar, 0, 1);
if(ip == NULL)
return;
+ if (acctp && (acctp->i_number != ip->i_number ||
+ acctp->i_dev != ip->i_dev))
+ irele(acctp);
acctp = ip;
iunlock(ip);
}
acctp = ip;
iunlock(ip);
}
if (i = u.u_vm.vm_utime + u.u_vm.vm_stime)
ap->ac_mem = (u.u_vm.vm_ixrss + u.u_vm.vm_idsrss) / i;
ap->ac_io = compress((long)(u.u_vm.vm_inblk + u.u_vm.vm_oublk));
if (i = u.u_vm.vm_utime + u.u_vm.vm_stime)
ap->ac_mem = (u.u_vm.vm_ixrss + u.u_vm.vm_idsrss) / i;
ap->ac_io = compress((long)(u.u_vm.vm_inblk + u.u_vm.vm_oublk));
+ if (u.u_ttyp)
+ ap->ac_tty = u.u_ttyd;
+ else
+ ap->ac_tty = NODEV;
ap->ac_flag = u.u_acflag;
siz = ip->i_size;
u.u_offset = siz;
ap->ac_flag = u.u_acflag;
siz = ip->i_size;
u.u_offset = siz;