Re: Filehandles in a socket server

2008-03-10 Thread Tom Phoenix
On Mon, Mar 10, 2008 at 7:43 AM, Jonathan Mast <[EMAIL PROTECTED]> wrote: > What benefit does flushing have? Would it help prevent memory > leaks as per the above scenario or what? Flushing gets the data out right away, in case there's anybody waiting for it. In the case of log files, it means

Re: Filehandles in a socket server

2008-03-10 Thread Jonathan Mast
Yeah I'm leaving it alone for now. The socket server receives input episodically and could be invoked thousands of times per minute. But typically it 2 or 3 times per hour. It just seems to be a design flaw to do the repeated open/closing stuff inside the while loop. But something that

Re: Filehandles in a socket server

2008-03-10 Thread Rob Dixon
Jonathan Mast wrote: > We have a socket server that, in addition to serving data, also writes logging statements to a file. My question concerns the correctness of how it accesses the log file. The script is running continuously and all the log file IO stuff is inside the main 'whi

Re: Filehandles in a socket server

2008-03-10 Thread Chas. Owens
On Mon, Mar 10, 2008 at 10:08 AM, Jonathan Mast <[EMAIL PROTECTED]> wrote: > We have a socket server that, in addition to serving data, also writes > logging statements to a file. > > My question concerns the correctness of how it accesses the log file. The > script is run

Re: Filehandles in a socket server

2008-03-10 Thread John W. Krahn
Jonathan Mast wrote: We have a socket server that, in addition to serving data, also writes logging statements to a file. My question concerns the correctness of how it accesses the log file. The script is running continuously and all the log file IO stuff is inside the main 'while'

Filehandles in a socket server

2008-03-10 Thread Jonathan Mast
We have a socket server that, in addition to serving data, also writes logging statements to a file. My question concerns the correctness of how it accesses the log file. The script is running continuously and all the log file IO stuff is inside the main 'while' loop. The file is opene

Re: socket server

2004-11-05 Thread Owen Cook
On Fri, 5 Nov 2004, Rob Genovesi wrote: > > I'm looking to write a basic Perl server that will communicate via > TCP. I'd also like the program to be able to do other things while it > waits for client connections. Can anyone recommend that best way to do this? > > For example: A perl daem

socket server

2004-11-05 Thread Rob Genovesi
Hi All, I'm looking to write a basic Perl server that will communicate via TCP. I'd also like the program to be able to do other things while it waits for client connections. Can anyone recommend that best way to do this? For example: A perl daemon that does some polling every few seconds and

Re: Socket Server

2002-03-27 Thread Scott Wahlstrom
National Center for Data Mining University of Illinois - Chicago - - Original Message - From: "paul beckett (JIC)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 27, 2002 11:40 AM Subject: So

Socket Server

2002-03-27 Thread paul beckett (JIC)
I want to write a perl socket server app to communicate with a java TCP client. I've tried looking in the (O'Reilly) Programming Perl, which I've found quite overwhelming. Can anyone suggest a good place to find more information on this topic (starting with the real basics of lis

Re: problem redirecting STDOUT to file in TCP socket server script

2002-03-18 Thread news reader
<[EMAIL PROTECTED]> [2002-03-15 21:36 +0100]: > > I have a perl script which is working as TCP socket server. [...] > > if (($processarray[$testNo] = fork()) == 0) { > > [...] > > The problem that i am facing is : the same line is printed more than once > >

Re: problem redirecting STDOUT to file in TCP socket server script

2002-03-16 Thread Johannes Franken
* news reader <[EMAIL PROTECTED]> [2002-03-15 21:36 +0100]: > I have a perl script which is working as TCP socket server. [...] > if (($processarray[$testNo] = fork()) == 0) { > [...] > The problem that i am facing is : the same line is printed more than once When you fork(),

problem redirecting STDOUT to file in TCP socket server script

2002-03-15 Thread news reader
Hello, I have a perl script which is working as TCP socket server. In this I am redirecting STDOUT to file. with command in the begining of the script: open STDOUT, '>./tRL.out' or die "./tRL.out: $!"; I have following four "print STDOUT" comm