0

I have a problem.I've written a program in C for armbian.

I am using RTKLIB software for GPS data conversion from ubx to RTCM3.

I get some data from serial port and start str2str(rtklib software).

It creates this command to run

str2str -in tcpsvr://:2101#ubx -out serial://ttyS2:115200#rtcm3 

and call system function to run this command. It is successful, but when I send a new command, I want it to stop the str2str software.

I've tried the exit(0) and it stops my software. I don't want to stop my software. I want to stop str2str and create a new command and run it again.

How can I do it? I am not good with the linux environment.

Thanks

4

1 回答 1

1

我建议您了解如何搜索要杀死的 str2str 进程,并获取 PID。stackoverflow 搜索将显示这一点,然后使用 PID 终止进程。除非 RTKLIB 有直接执行此操作的流程。

于 2017-12-15T12:40:09.467 回答