chiark / gitweb /
prefork-interp: fixes and tests
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 11 Aug 2022 19:36:31 +0000 (20:36 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Aug 2022 20:21:10 +0000 (21:21 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
cprogs/prefork-interp.c

index 916fdefcfad249bf932e3b68b6a60b38683f0c48..8c032dba04902c68df3a07382315ac09c80b91fc 100644 (file)
@@ -341,7 +341,8 @@ static FILE *connect_or_spawn(void) {
   // We must start a fresh one, and we hold the lock
 
   r = unlink(socket_path);
-  if (r<0) diee("failed to remove stale socket %s", socket_path);
+  if (r<0 && errno!=ENOENT)
+    diee("failed to remove stale socket %s", socket_path);
 
   int fake_pair[2];
   r = socketpair(AF_UNIX, SOCK_STREAM, 0, fake_pair);