Print this page
XXXX adding PID information to netstat output

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/doorfs/door_sys.c
          +++ new/usr/src/uts/common/fs/doorfs/door_sys.c
↓ open down ↓ 1776 lines elided ↑ open up ↑
1777 1777          struct vnode *vp;
1778 1778          int     fd;
1779 1779          door_attr_t attributes = DOOR_DESCRIPTOR;
1780 1780  
1781 1781          ASSERT(MUTEX_NOT_HELD(&door_knob));
1782 1782          if ((fd = ufalloc(0)) == -1)
1783 1783                  return (-1);
1784 1784          setf(fd, fp);
1785 1785          dp->d_data.d_desc.d_descriptor = fd;
1786 1786  
     1787 +        /* add curproc to the pid list associated with that file */
     1788 +        if (fp->f_vnode != NULL)
     1789 +                (void) VOP_IOCTL(fp->f_vnode, F_FORKED, (intptr_t)curproc, FKIOCTL,
     1790 +                        kcred, NULL, NULL);
     1791 +
1787 1792          /* Fill in the attributes */
1788 1793          if (VOP_REALVP(fp->f_vnode, &vp, NULL))
1789 1794                  vp = fp->f_vnode;
1790 1795          if (vp && vp->v_type == VDOOR) {
1791 1796                  if (VTOD(vp)->door_target == curproc)
1792 1797                          attributes |= DOOR_LOCAL;
1793 1798                  attributes |= VTOD(vp)->door_flags & DOOR_ATTR_MASK;
1794 1799                  dp->d_data.d_desc.d_id = VTOD(vp)->door_index;
1795 1800          }
1796 1801          dp->d_attributes = attributes;
↓ open down ↓ 1766 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX