Re: Read from a Linux pipe hangs.

2005-02-23 Thread David Moron
I need the read non-blocking of check if there's any data ready before doing the READ. The complete consumer is a program that reads account packets from a radius server (this problem has been solved) and stores the Radius attributes (MAC,IP,User_name) in a List of Hashes. This list of hashes has t

RE: Read from a Linux pipe hangs.

2005-02-23 Thread Bob Showalter
David Moron wrote: > The consumer has only to read lines from its STDIN and print them to > the STDOUT. print while(<>); > > These scripts are a simplified version of the producer/consumer > problem and they try to emulate a multithreaded perl program. IMHO > It's not important what I want to d

Re: Read from a Linux pipe hangs.

2005-02-23 Thread David Moron
The consumer has only to read lines from its STDIN and print them to the STDOUT. These scripts are a simplified version of the producer/consumer problem and they try to emulate a multithreaded perl program. IMHO It's not important what I want to do with consumer, the problem is that consumer

RE: Read from a Linux pipe hangs.

2005-02-23 Thread Bob Showalter
David Moron wrote: > Hi everybody, > > I'm testing a simple IPC implementation that uses Linux pipes to > communicate a producer script and a consumer. > The producer script looks like: > > while(1){ > print "Hello\n"; > sleep(2); > } > > > And the consumer: > > my @lines; >

Read from a Linux pipe hangs.

2005-02-23 Thread David Moron
Hi everybody, I'm testing a simple IPC implementation that uses Linux pipes to communicate a producer script and a consumer. The producer script looks like: while(1){ print "Hello\n"; sleep(2); } And the consumer: my @lines; while(1){ sleep(10); if (){#Non-blocking