anchor.diff:      :type (integer 0))
      (lock
       :reader ref-counted-fd-lock
  -    :initform (make-lock "ref-counted-fd-lock"))))
  +    :initform (make-lock "ref-counted-fd-lock")))
  +  (:documentation
  +   "A class representing a file descriptor that is managed using
  +`fd-wrapper-retain' and `fd-wrapper-release'.
  +
  +A ref counted fd will be closed when its retain count reaches 0."))
   
   (defmethod print-object ((fd ref-counted-fd) stream)
     (print-unreadable-object (fd stream :type t)
  
positive.code:   (declare (type (integer 0) fd-value))
    (make-instance 'ref-counted-fd :value fd-value))
  
  (defgeneric fd-wrapper-retain (fd))
  (defgeneric fd-wrapper-release (fd))
  
  (defmethod fd-wrapper-retain ((fd null))
    fd)
  
negative.code:     (values)))
  
  (defun set-fd-binding (virtual-fd physical-fd-wrapper)
    "Bind the given virtual file descriptor to the given physical fd
  wrapper.
  
  If `physical-fd-wrapper' is nil, this simply calls
  `unset-fd-binding'.
  
  The given fd wrapper will be retained as long as this binding remains
  in effect."
    (unless physical-fd-wrapper
      (return-from set-fd-binding (unset-fd-binding virtual-fd)))
    (with-ref-counted-fd-retained physical-fd-wrapper
  