home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.protocols.tcp-ip      TCP and IP network protocols.      14,669 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 12,807 of 14,669   
   Jorgen Grahn to feenberg   
   Re: netcat and xinetd   
   14 Apr 09 12:51:01   
   
   3a3adc2a   
   From: grahn+nntp@snipabacken.se   
      
   On Mon, 13 Apr 2009 08:28:31 -0700 (PDT), feenberg  wrote:   
   > We have fortran program that we wish to use as a network service under   
   > xinetd. The program reads a line from standard in, then writes 1 or 4   
   > lines to standard out, like a filter. We use various versions of   
   > netcat to send data, and for small input files this always works. But   
   > once we get above a 100 or so lines of input, it is likely to hang. It   
   > doesn't always hang, and the behavior seems in no way data dependent.   
   > (Called directly from the command line it never hangs). We have been   
   > tearing out our hair trying to debug the problem, but changing the   
   > client netcat, the server OS and the fortran compiler in no way affect   
   > the outcome. We added a "flush" command to flush the standard output   
   > after each output record, to no avail.   
   >   
   > I fired up tcpdump [...]   
      
   Two ways to find out what the *program* thinks it's doing when nothing   
   happens:   
      
   - In at least Linux, trace the system calls it makes by running   
     'strace -o somewhere your_program' from (x)inetd.   
      
   - Kill the program with 'pkill -SEGV your_program' and debug the   
     core dump.   
      
   Other than that, I don't know what it takes to be an "inetd-friendly"   
   program. Flushing sounds like a good idea though.   
      
   /Jorgen   
      
   --   
     // Jorgen Grahn           R'lyeh wgah'nagl fhtagn!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca