暂停和恢复由 Qt 中的 QProcess 启动的子进程
Suspend and resume a sub-process started by QProcess in Qt
如何暂停和恢复在 Qt 中作为 QProcess 启动的子进程?是否有用于该功能的 Qt 函数,如果没有,是否有适用于 Linux 的特定于平台的函数?
因为我在 linux,所以我使用了 kill() 函数。
#include <signal.h>
...
kill(process->pid(), SIGSTOP); // suspend
kill(process->pid(), SIGCONT); // resume
如何暂停和恢复在 Qt 中作为 QProcess 启动的子进程?是否有用于该功能的 Qt 函数,如果没有,是否有适用于 Linux 的特定于平台的函数?
因为我在 linux,所以我使用了 kill() 函数。
#include <signal.h>
...
kill(process->pid(), SIGSTOP); // suspend
kill(process->pid(), SIGCONT); // resume