C ++系统调用查杀程序进程(Ubuntu)?

时间:2016-03-11 00:31:55

标签: c++ ubuntu

在我的C ++代码中,我使用system()来调用Ocropus,这是一个用python编写的OCR cli工具。我认为进行一些系统调用比考虑在我的代码中嵌入Python并直接调用OCR函数更容易。 Anywho,

对于Ocropus的system调用(在它工作时输出到stdout),我看到" Killed"此时它会返回我的user@computer:~/path。但奇怪的是,Ocropus继续运行,完成。它不能^C^\来杀死它。我可能只是误解了system()。谢谢你的帮助

示例代码:

system("ocropus-gpageseg -n --maxcolseps 0 col?.png");

输出:

INFO:  
INFO:  ########## ocropus-gpageseg -n --maxcolseps 0 /image/path/here
INFO:  
INFO:  image/path/here
INFO:  scale 21.0237960416
INFO:  computing segmentation
INFO:  computing column separators
INFO:  computing lines
Killed
user@computer:~/path
INFO:  propagating labels
INFO:  spreading labels
INFO:  number of lines151
INFO:  finding reading order
INFO:  writing lines
...And it continues to completion

0 个答案:

没有答案