[英]using spawnl and waiting for child process to exit
I am using c++ in borland development studio to launch a process. 我在borland Development Studio中使用c ++启动过程。 After the process is launched, the parent application is supposed to wait for it, but still keep processing windows messages.
启动该过程后,父应用程序应该等待它,但仍继续处理Windows消息。
I tried using spawnl with P_WAIT after launching a timer, but timer wont fire when thread is blocked, i also tried using spawnl with P_NOWAIT together with cwait, but that didnt work either. 我在启动计时器后尝试将spawnl与P_WAIT一起使用,但是当线程被阻塞时,计时器不会触发,我也尝试将spawnl与P_NOWAIT和cwait一起使用,但是那也不起作用。
any suggestions ? 有什么建议么 ?
many thanks 非常感谢
Are you waiting for the process to complete in a method that handles Windows messages? 您是否正在等待处理Windows消息的方法中的完成过程? If you wait for the new process in a button-click handler, Windows won't process any more messages until the button-click method completes.
如果您在按钮单击处理程序中等待新的过程,则在按钮单击方法完成之前,Windows将不再处理任何消息。
If you need timer-based background processing you have a few options: 如果您需要基于计时器的后台处理,则有以下几种选择:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.