]> git.ipfire.org Git - people/stevee/guardian.git/commitdiff
Socket.pm: Fix error messages when crashing.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 23 Nov 2015 09:24:52 +0000 (10:24 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Mon, 23 Nov 2015 09:24:52 +0000 (10:24 +0100)
When the module crashed (died) for some reasons, the provided details where
empty.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
modules/Socket.pm

index ea1c723f806cc6908e365bdd02192a05e46c8c77..cdcca0016d35fbb14c6c222cb08f43af32543e48 100644 (file)
@@ -33,7 +33,7 @@ sub Server () {
        # If the path for the socketfile does not exist, try to
        # create it.
        unless (-d "$socketpath") {
        # 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.
        }
 
        # Delete an existing socket file.
@@ -47,7 +47,7 @@ sub Server () {
                Local => $socketfile,
                Listen => SOMAXCONN,
                Type => SOCK_STREAM,
                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;
 
        # Return the server object.
        return $server;