Rewrite wxExecute() implementation under Unix.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Jul 2013 00:32:16 +0000 (00:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Jul 2013 00:32:16 +0000 (00:32 +0000)
commit821d856a610b21f2946e3283db7f79443227776e
tree6ef19978927709174bcca0b733a97d431294e992
parent76015a6bb79156d8af1b5e8b4b8e46b4e192d18f
Rewrite wxExecute() implementation under Unix.

This commit changes wxExecute() to handle SIGCHLD to be notified about the
child process termination instead of detecting when the file descriptor
corresponding to the other end of a pipe opened in the parent process was
closed in the child as this was not reliable and could (and did) result in not
detecting the termination of the child processes that closed all their file
descriptors before exiting.

This commit also removes a lot of platform-specific code duplicating the
generic event loop sources support and reuses it for wxExecute() purposes too.

Final big change is that wxEndProcessData was merged into wxExecuteData and we
don't have two similar but quite different classes any more but just one,
which is used both to pass the information from wxExecute() to wxAppTraits
methods and to store this information until the child termination.

Closes #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
22 files changed:
docs/changes.txt
include/wx/unix/app.h
include/wx/unix/apptbase.h
include/wx/unix/apptrait.h
include/wx/unix/execute.h
include/wx/unix/private/executeiohandler.h [new file with mode: 0644]
src/cocoa/evtloop.mm
src/cocoa/utilsexc.mm
src/common/evtloopcmn.cpp
src/dfb/utils.cpp
src/gtk/evtloop.cpp
src/gtk/utilsgtk.cpp
src/gtk1/utilsgtk.cpp
src/motif/utils.cpp
src/os2/utils.cpp
src/osx/core/evtloop_cf.cpp
src/osx/core/utilsexc_cf.cpp
src/unix/apptraits.cpp
src/unix/evtloopunix.cpp
src/unix/utilsunx.cpp
src/x11/utils.cpp
tests/exec/exec.cpp