bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bugs, when reading from socket...


From: Peter Tillmar
Subject: Bugs, when reading from socket...
Date: Fri, 30 Nov 2007 10:26:58 +0100

Hi, I have found i bug in gawk version 3.1.3. The problem is a little
bit odd...
Anyhow here is the senario.

 
1. In funtion loadrecoverydata the reading from file with statement
    "getline" fail due to that the file doesn't exist.

2. Later on the funtion listentosocket is called. When the statement
    which read messages from socket is reached the gawk crashes.        
   See fault details for more detail, please note the text at the end
   of this statement. Seems like coming from the failed file reading.


Best Regards / Peter Tillmar




#####################################################
# Function loadrecoverydata:
#####################################################
function loadrecoverydata() {

        i=0;
        source=logFilePath recoveryDataFile;
                while ( (getline line < source) == 1) {
<<<<<<<<<<<<<<<<<<<<<<<<<<
                        ntmp1=split(line, tmp1, ",");
                        if (ntmp1 > 0) {
                                TableMax += 1;
                                i += 1;
                        }

#####################################################
# Function listentosocket:
#####################################################
function listentosocket() {
        UDPServiceListen = "/inet/udp/" serverIPPort "/0/0"
        #UDPServiceSend = "/inet/udp/0/136.225.112.144/4595"

        while (CLoop) {
                toSocket="";
                fromSocket="";
                TransId="";
                clientIP="";
                clientPort="";
                sleep 5;
                UDPServiceListen |& getline fromSocket;
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<              
                close(UDPServiceListen);
                #print "fromSocket: " fromSocket;
                scanresendtable();
                split(fromSocket, tmp1, ":");
                fromSocketNF=split(tmp1[2], tmp2, ",");


#### returned text when gawk crashes....
gawk: netstatusserver.awk:556: (FILENAME=- FNR=1) fatal: can't open two
way socket `/inet/udp/4590/0/0' for input/output (No such file or
directory)    <<<<<<<<<<<<<<<<<<<<<<<<<


reply via email to

[Prev in Thread] Current Thread [Next in Thread]