From 3ae3ca9b01d8de4a99b4dc412fd22ea787420e92 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Mon, 23 Nov 2015 10:23:55 +0100 Subject: [PATCH 1/1] Socket.pm: Fix detection and deletion of an existing socket file. Signed-off-by: Stefan Schantl --- modules/Socket.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Socket.pm b/modules/Socket.pm index c8a17c9..ea1c723 100644 --- a/modules/Socket.pm +++ b/modules/Socket.pm @@ -37,9 +37,9 @@ sub Server () { } # Delete an existing socket file. - if (-s "$socketfile") { - unlink "$socketfile" - or die "Could not release existing socket file: $@\n"; + if (-e "$socketfile") { + unlink $socketfile + or die "Could not release existing socket file: $!\n"; } # Create a new UNIX socket. -- 2.39.2