From 071fce0249cb4e0dd5d4e9f5512f82459f38029b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 11 Aug 2022 20:36:31 +0100 Subject: [PATCH] prefork-interp: fixes and tests Signed-off-by: Ian Jackson --- cprogs/prefork-interp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.30.2