We study a generalization of the $M/G/1$ system (denoted by $rM/G/1$) with independent and identically distributed (iid) service times and with an arrival process whose arrival rate $lambda_0f(r)$ depends on the remaining service time $r$ of the current customer being served. We derive a natural stability condition and provide a stationary analysis under it both at service completion times (of the queue length process) and in continuous time (of the queue length and the residual service time). In particular, we show that the stationary measure of queue length at service completion times is equal to that of a corresponding $M/G/1$ system. For $f > 0$ we show that the continuous time stationary measure of the $rM/G/1$ system is linked to the $M/G/1$ system via a time change. As opposed to the $M/G/1$ queue, the stationary measure of queue length of the $rM/G/1$ system at service completions differs from its marginal distribution under the continuous time stationary measure. Thus, in general, arrivals of the $rM/G/1$ system do not see time averages. We derive formulas for the average queue length, probability of an empty system and average waiting time under the continuous time stationary measure. We provide examples showing the effect of changing the reshaping function on the average waiting time.