I am writing a program that uses streaming data from the terminal. If you are interested the following command:
system("candump slcan0 > sources/file.txt").
I want the system to run that command for x seconds. But a normal stop of the system call would be fine, I'll write some code that will execute the stop after x seconds.
The program will process this data and, so an exit(EXIT_SUCCESS) won't help. That will let the whole program stop instead of only the system call.