I'm running the following command in Linux:
sudo ./tftpCommand &
where my executable tftpCommand file simply gets/puts a data file which sometimes does not exist. I want to be able to stop the tftp command that was spawned in the subshell before it automatically times out.
Using something like kill $(jobs -p)
shows that the subshell has been terminated but the tftp still runs -- I know this because several seconds later it prints to the shell that it can't find the file to transfer.
QUESTION: How do I ensure that the tftp command is killed alongside the subshell that runs it?
Thanks!