我正在 Linux 上编写多线程程序,并希望在一个线程中创建一个进程而不结束其他线程。我查看了 fork/exec 但在 exec 手册页中第 3p 节的 linux 状态:
A call to any exec function from a process with more than one thread
shall result in all threads being terminated and the new executable
image being loaded and executed. No destructor functions shall be
called.
有没有办法在不终止其他线程的情况下产生一个新进程?