Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm getting this error "* glibc detected * /usr/sbin/tshark: double free or corruption " while doing this, any idea why?

#!/bin/bash
trap 'my_exit; exit' SIGINT SIGQUIT
count=0



/usr/sbin/tshark -i bond1.1  -f "port 1111" -w /test/test_1.pcap > /dev/null 2>&1 &
PID1=$!

/usr/sbin/tshark -i bond1.6  -f "port 8080" -w /test/test_2.pcap > /dev/null 2>&1 &
PID2=$!



function my_exit()
{

    kill $PID1 
    kill $PID2 
}

while :
 do
   sleep 1
   count=$(expr $count + 1)
 done

BTW, When I try to run one tshark and kill it it works fine.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.