Clean up after ourselves, sockets and semaphores