From: Ian Jackson Date: Thu, 11 Aug 2022 19:36:31 +0000 (+0100) Subject: prefork-interp: fixes and tests X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=071fce0249cb4e0dd5d4e9f5512f82459f38029b;p=chiark-utils.git prefork-interp: fixes and tests Signed-off-by: Ian Jackson --- diff --git a/cprogs/prefork-interp.c b/cprogs/prefork-interp.c index 916fdef..8c032db 100644 --- a/cprogs/prefork-interp.c +++ b/cprogs/prefork-interp.c @@ -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);