如何在std :: thread或pthread中执行或运行shell命令?

时间:2019-02-21 18:32:12

标签: c++ shell pthreads stdthread

我正在使用的基于FreeBSD的OS上的应用程序进程之一是多线程的。 由于system()popen()派生了一个新的进程,因此从处理关键部分和互斥对象的线程中调用它们并不是一个好主意。

在std :: thread或pthread中运行shell命令还有哪些其他选择?

0 个答案:

没有答案