4. Let real numbers $x, y, z$ satisfy
$$
x+\frac{1}{y}=1, y+\frac{1}{z}=1 \text {. }
$$

Then the value of $x y z$ is ( ).
(A) 1
(B) 2
(C) -1
(D) -2
4. C.

From $x+\frac{1}{y}=1$, we get $x y=y-1$; from $y+\frac{1}{z}=1$, we get $y z=z-1$.

Multiplying the two equations, we get
$$
\begin{array}{l}
x y z=\frac{y z-(y+z)+1}{y} \\
=z-1+\frac{1-z}{y}=z-1+\frac{-y z}{y}=-1 .
\end{array}
$$