main: read only one signal and only return -1 if it succeeded