我正在写在C程序的控制,在这个模型:空调系统()采用标准输出
//Block 1: Does a lot of operations, including debug messages
strcpy(call, "xdg-open ");
strcat(call, url);
system(call);
//Block 2: Does a lot of operations, including debug messages
的system()
调用后,它看起来像这一函数的标准输出的控制及块2调试消息不会打印更长时间,只会显示Block 1消息。
是否有人知道发生了什么,以及可能的解决方案是什么?
'system'调用等待其子进程结束。换言之,只有在'xdg-open'将被关闭时,控件才会被传递给block2。 –
我现在明白,但我该如何解决这个“问题”? – amportugal