Controlling partial pressure or flow rate of reactive or inert gases with feedback of measurements