What are you talking about. As long as he is onside before the ball is played to him he is onside. That is thr definition of onside.
Thr linesman waving his hand back and forth is just using a signal for that specific type of offside.
Edit: just read tfctifoso clarified it.
To expand on it. Play A is looking to pass to player B. Player B runs into an offside position so player A witholds passing him the ball. Player B runs back to an onside position and while waiting in an onside position Player A passes him the ball. He is onside. The reason they get caught "running the line" is cause they got caught in the offside position when the ball was played not just because they were standing there at some point.