From 0d907cbab4e1b6465b7abc0b1845ccc232f5eede Mon Sep 17 00:00:00 2001 From: toshinagata1964 Date: Mon, 12 Nov 2012 11:21:23 +0000 Subject: [PATCH] In calling a subprocess, a wait of 10 msec is inserted between termination check (may be or not useful for more stable handling of subprocesses...? git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@330 a2be9bc6-48de-4e38-9406-05402d4bc13c --- wxSources/MyApp.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wxSources/MyApp.cpp b/wxSources/MyApp.cpp index a455490..f98bdf5 100755 --- a/wxSources/MyApp.cpp +++ b/wxSources/MyApp.cpp @@ -1286,17 +1286,22 @@ MyApp::CallSubProcess(const char *cmdline, const char *procname) if (waitpid(pid, &status, WNOHANG) != 0) { /* Already finished, although not detected by wxProcess */ /* This sometimes happens on ppc Mac */ +#if LOG_SUBPROCESS + if (fplog) + fprintf(fplog, "OnEndProcess *NOT* called\n"); +#endif proc->Detach(); status = WEXITSTATUS(status); break; } #endif #if LOG_SUBPROCESS - if (++nn >= 100) { + if (++nn >= 10) { fprintf(fplog, "[DEBUG]pid %ld exists\n", pid); nn = 0; } #endif + ::wxMilliSleep(10); if (wxGetApp().IsInterrupted()) { /* User interrupt */ int kflag = wxKILL_CHILDREN; -- 2.11.0