I have heard doing it this way will cause grief.. need blocking i/o or
something
along that lines. Also, I head that the flow of the program would _stop_
when reading the data...

are there any other solutions?

Ron

P.S.
kk, I never did get you example code working under Solaris, it works fine
under Linux


> -----Original Message-----
> From: David M. Lloyd [mailto:[EMAIL PROTECTED]]
> Sent: June 28, 2001 09:55
> To: Ronald J. Yacketta
> Cc: Perl
> Subject: Re: background processing (again?)
>
>
> On Thu, 28 Jun 2001, Ronald J. Yacketta wrote:
>
> > Folks,
> >
> > to make a long story short I have a req to-do the following. 1) gather
> > continues data from netstat -I hme0 $SLEEPTIME > $netstatTMPFILE &
> > while still parsing other information/data etc..
> >
> > that is, the script needs to be bale to collect the netstat data while
> > it is running other process, not just fork netstat and wait for it to
> > die/return. it will never die/return unless it is killed.
>
> Try something like this:
>
> open NETSTAT, "netstat -I hme0 $SLEEPTIME |" or die "Can't start
> netstat: $!\n";
>
> Then, just read from the NETSTAT file handle.
>
> For more information, look at 'open' and 'sysopen' in the Camel book.
> Also, you may want to consider using 'select' if you don't want to block
> on reads.  (Be sure you look at the 'ready file descriptors' version of
> 'select').
>
>
> - D
>
> <[EMAIL PROTECTED]>
>
>

Reply via email to