Ping problem in LINUX
hello,
i run the ping command using system() in C..its start pinging the desired destination bt when i close my application it continues to ping...is there any solution dat as soon as i close my application it also stops pinging...ny change required in my C code..? plz reply..thanks 4 ur tym... |
In your program, add -c 5 to the ping command; that'll stop after five pings (otherwise, ping will go on forever).
Also, rather than using the system() function, look into the exec() family of functions (but use the -c argument!). |
Add kill at end?
|
All times are GMT -5. The time now is 08:55 AM. |