
Somewhere I've seen a video of this same scene. As the train arrives, the market people retract the awnings; everything else is carefully positioned to correspond to the clearance of the train cars. After it passes the market returns to its usual activity.
Click to enlarge; found at Izismile (credit unknown).
Update: A tip of the hat to Ambuj Saxena for finding the video, now embedded below. One has to be awestruck sometimes by the resourcefulness and adaptibility of people.