Daemon: raise error if we cannot parse lockfd
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Jan 2015 09:41:52 +0000 (10:41 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Jan 2015 09:41:52 +0000 (10:41 +0100)
data/PVE/Daemon.pm

index 683743c..1436f17 100644 (file)
@@ -367,7 +367,8 @@ sub new {
        delete $ENV{PVE_DAEMON_LOCK_FD};
 
        if (defined($lockfd)) {
-           $lockfd =~ m/^(\d+)$/;
+           die "unable to parse lock fd '$lockfd'\n"
+               if $lockfd !~ m/^(\d+)$/;
            $lockfd = $1; # untaint
        }