Hikmet TEKIN Posted December 14, 2017 Posted December 14, 2017 Hi everybody, My question is about stop a running program with C. I have written a c code to start program with system() function in orange pi zero. I am starting RTKLIB software, which is STR2STR and when my code starts the software with command str2str -in serial://ttyS1:115200 -out serial:ttyS2:115200, I can stop it with CTRL^C but I want to stop it from my software. When I got a TCP pocket containing a exit status word. It should stop the STR2STR software. I am not very good at linux. How can I do that? Thanks
FredrikA Posted January 27, 2018 Posted January 27, 2018 If you can start it you can stop it. when you start it keep a reference to the PID, then follow this guide https://www.thegeekstuff.com/2011/02/send-signal-to-process/
Recommended Posts