kill the process launched by wxExecute(ASYNC) to avoid leaving unneeded processes running
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -565,8 +565,13 @@ static void TestExecute()
|
|||||||
|
|
||||||
wxPrintf(_T("Testing async wxExecute: "));
|
wxPrintf(_T("Testing async wxExecute: "));
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
if ( wxExecute(ASYNC_COMMAND) != 0 )
|
int pid = wxExecute(ASYNC_COMMAND);
|
||||||
|
if ( pid != 0 )
|
||||||
|
{
|
||||||
wxPuts(_T("Ok (command launched)."));
|
wxPuts(_T("Ok (command launched)."));
|
||||||
|
if ( wxKill(pid) == -1 )
|
||||||
|
wxPuts("ERROR: failed to kill child process.");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
wxPuts(_T("ERROR."));
|
wxPuts(_T("ERROR."));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user