Ethereal-users: Re: [Ethereal-users] Reliable termination of a tethereal capture from ascript

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Gisle Vanem" <giva@xxxxxxxxx>
Date: Fri, 26 Mar 2004 11:24:17 +0100
"Piergiorgio Brandolin" <piergiorgio.brandolin@xxxxxxxxx> said:

> I am writing some perl scripts (ActivePerl 5.6 on a Win2K system) that perform tests on 
> network devices. The basic structure of these scripts is : start (asynchronously) a tethereal
> capture, perform some operation on devices, stop the trace, analyze the trace.
> I'm using the Win32::Process package but the kill method look unreliable (for small traffic the
> capture file is empty, it looks like tethereal or the underlying libpcap perform a sort of buffering 
> and I don't know how to force a disk write).

My best advise is to use "GenerateConsoleCtrlEvent (CTRL_C_EVENT,0)"
to raise a SIGINT in the child. How you this in Perl is beyond my knowledge.
Ask in a CPAN group.

--gv