The state variables p, V, E, S etc. are only defined for equilibrium states. In classical thermodynamics, all states proceed from one initial equilibrium state to a final equilibrium state. The entropy difference can be calculated for any path in equilibrium state space to the final state.
