Ask Your Question
0

How to run a tshark command on the background in c++

asked 2018-04-16 16:29:18 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

hi i use tshark in my c++ program. i use this command in my program

> system (tshark -r tese.pcap -T fields -e ip.src > test.txt);

When i run my program, the cmd window (black window) is displayed. i want to run tshark in silence (when tshark run the cmd window doesn’t display). Is it possible?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-04-17 08:50:40 +0000

grahamb gravatar image

The C Std Library system call doesn't provide any control over the target execution environment. Assuming you're using Windows (you mentioned a cmd window) then you should look into using the Win32 API CreateProcess.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-04-16 16:29:18 +0000

Seen: 1,078 times

Last updated: Apr 17 '18