Your message dated Sat, 29 Apr 2017 15:56:26 +0200
with message-id <[email protected]>
and subject line Re: Use of uninitialized value $pid in scalar chomp at 
/data/nfsen/libexec/NfSenRC.pm line 357.
has caused the Debian Bug report #861400,
regarding Use of uninitialized value $pid in scalar chomp at 
/data/nfsen/libexec/NfSenRC.pm line 357.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
861400: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861400
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: nfsen
Version: 1.3.6p1

The error happens when the pid files were created without any value. Also
when nfsen.pid  have a null value

Error if nfsen.pid has null content.
Use of uninitialized value $pid in scalar chomp at
/data/nfsen/libexec/NfSenRC.pm line 201.
Can't kill a non-numeric process ID at /data/nfsen/libexec/NfSenRC.pm line
203.

Error if p995.pid has null value.
Starting nfcapd:(Device)Use of uninitialized value $pid in scalar chomp at
/data/nfsen/libexec/NfSenRC.pm line 357.
Can't kill a non-numeric process ID at /data/nfsen/libexec/NfSenRC.pm line
359.

I suggest changes in the /data/nfsen/libexec/NfSenRC.pm

LINE: 196,1-8

***** ACTUAL *******
        # Check if NfSen is already running
        if ( -f "$NfConf::PIDDIR/nfsend.pid" ) {
                open PID, "$NfConf::PIDDIR/nfsend.pid" ||
                        die "Can't read pid file
'$NfConf::PIDDIR/nfsend.pid': $!\n";
                my $pid = <PID>;
                chomp $pid;
                close PID;
                if ( kill( 0, $pid) == 1  ) {
                        print "NfSen is already running!\n";
                        return;
                } else {
                        print "Unclean shutdown - run stop sequence first
to clean up!\n";
                        NfSen_stop();
                }
        }

***** CHANGES *******
        # Check if NfSen is already running
        if ( -f "$NfConf::PIDDIR/nfsend.pid" ) {
                open PID, "$NfConf::PIDDIR/nfsend.pid" ||
                        die "Can't read pid file
'$NfConf::PIDDIR/nfsend.pid': $!\n";
                my $pid = <PID>;
                close PID;

        if ($pid) {
                        chomp $pid;
                           if ( kill( 0, $pid) == 1  ) {
                                print "NfSen is already running!\n";
                                return;
                        } else {
                                print "Unclean shutdown - run stop sequence
first to clean up!\n";
                                NfSen_stop();
                        }
                } else {
                        unlink "$pidfile";
                }
        }



LINE: 353,2-9

***** ACTUAL *******
        if ( -f "$pidfile" ) {
                open PID, "$pidfile" ||
                        die "Can't read pid file '$pidfile': $!\n";
                my $pid = <PID>;
                chomp $pid;
                close PID;
                if ( kill( 0, $pid) == 0  ) {
                        unlink "$pidfile";
                        return -1;
                } else {
                        return $pid;
                }
        } else {
                return 0;
        }


***** CHANGES *******
    if ( -f "$pidfile" ) {
                open PID, "$pidfile" ||
                        die "Can't read pid file '$pidfile': $!\n";
                my $pid = <PID>;
                close PID;

                if ($pid) {
                        chomp $pid;
                        if ( kill( 0, $pid) == 0  ) {
                                unlink "$pidfile";
                                return -1;
                        } else {
                                return $pid;
                        }
                } else {
                        unlink "$pidfile";
                }

        } else {
                return 0;
        }

I am using Linux HOST 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2
(2017-03-07) x86_64 GNU/Linu

​Thank you very much.

Alfredo​ Nacino

--- End Message ---
--- Begin Message ---
On Fri, 28 Apr 2017 14:27:33 +0200 Alfredo Nacino
<[email protected]> wrote:
> Package: nfsen
> Version: 1.3.6p1

That software is not packaged in Debian.

Also /data/nfsen/libexec/NfSenRC.pm is a path taht wouldn't be used in a
Debian package.

Please report the problems to whomever provided the installation or to
upstream if you installed it yourself.


Andreas

--- End Message ---

Reply via email to