Let's say I send the command "tree C:\" (or something similar that returns a large amount of data) and I want to stop the process (as if I'd pressed Ctrl + C) - how would I go about doing this? I've tried passing SIGINT to the signal function, messed around with pipe, fork, execl, etc... can't seem to get anything to work.
Anyone mind schooling me on how this is done correctly?