chiark / gitweb /
prefork-interp: fixes and tests
[chiark-utils.git] / 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);