I am using the following line of code to execute the ping utility from a tcl/tk application.
if {[catch {open "|ping -c $num_packets -s $packetsize -i $packetinterval $destaddress |& cat"} pipe]} {
When ping is running and someone sends an interupt ie. ctrl+c
The statistics are generated at the very bottom
eg.
--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% loss, time 1005ms
rtt min/avg/max/mdev = 0.031/0.042/0.054/0.013 ms
I want to be able to send an interrupt to the process while it is running and generate the statistics. A kill -9 on the pid doesnt generate the statistics.
I would appreciate if anyone could help me out here.
if {[catch {open "|ping -c $num_packets -s $packetsize -i $packetinterval $destaddress |& cat"} pipe]} {
When ping is running and someone sends an interupt ie. ctrl+c
The statistics are generated at the very bottom
eg.
--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% loss, time 1005ms
rtt min/avg/max/mdev = 0.031/0.042/0.054/0.013 ms
I want to be able to send an interrupt to the process while it is running and generate the statistics. A kill -9 on the pid doesnt generate the statistics.
I would appreciate if anyone could help me out here.