It looks like you are trying to use the reader as a server since it's the one calling 'accept'. The process that continues running should have that role.
Otherwise, the socket object ($write) loses its counterpart when the reader exits, and would have to reconnect.
Suggest: move your accept call to the server side. Servers usually check for new connections and 'accept' them, or dedicate a thread to blocking accept calls and using worker threads to handle the connections. Unix socket files may be slightly different (I haven't used them much), but I expect the principles to be the same.