Creating server ctl socket in a loop to protect from interrupt