From: Stefan Schantl Date: Mon, 23 Nov 2015 09:24:52 +0000 (+0100) Subject: Socket.pm: Fix error messages when crashing. X-Git-Tag: 2.0~76 X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fguardian.git;a=commitdiff_plain;h=6c92714810fde79fa5b12155b66002c5c4f65250 Socket.pm: Fix error messages when crashing. When the module crashed (died) for some reasons, the provided details where empty. Signed-off-by: Stefan Schantl --- diff --git a/modules/Socket.pm b/modules/Socket.pm index ea1c723..cdcca00 100644 --- a/modules/Socket.pm +++ b/modules/Socket.pm @@ -33,7 +33,7 @@ sub Server () { # If the path for the socketfile does not exist, try to # create it. unless (-d "$socketpath") { - mkdir("$socketpath") or die "Could not create $socketpath: $@\n"; + mkdir("$socketpath") or die "Could not create $socketpath: $!\n"; } # Delete an existing socket file. @@ -47,7 +47,7 @@ sub Server () { Local => $socketfile, Listen => SOMAXCONN, Type => SOCK_STREAM, - ) or die "Could not create socket: $@\n"; + ) or die "Could not create socket: $!\n"; # Return the server object. return $server;