Non-blocking version of system()

后端 未结 6 642
傲寒
傲寒 2020-12-09 03:24

I want to launch a process from within my c program, but I don\'t want to wait for that program to finish. I can launch that process OK using system() but that always waits.

6条回答
  •  情深已故
    2020-12-09 03:37

    You could use posix_spawnp() function. It's much similar to system() than the fork and exec* combination, but non-blocking.

提交回复
热议问题