Close socket on interrupt in other pselect call and properly open loaders shared memory