1 /////////////////////////////////////////////////////////////////////////////
2 // Name: unix/execute.h
3 // Purpose: private details of wxExecute() implementation
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart, Vadim Zeitlin
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_UNIX_EXECUTE_H
11 #define _WX_UNIX_EXECUTE_H
13 #include "wx/unix/pipe.h"
15 class WXDLLIMPEXP_FWD_BASE wxProcess
;
16 class wxStreamTempInputBuffer
;
18 struct wxEndProcessData
29 int pid
; // pid of the process
30 int tag
; // port dependent value
31 wxProcess
*process
; // if !NULL: notified on process termination
32 int exitcode
; // the exit code
33 bool async
; // if true, delete us on process termination
36 // struct in which information is passed from wxExecute() to wxAppTraits
52 fdErr
= wxPipe::INVALID_FD
;
53 #endif // wxUSE_STREAMS
56 // get the FD corresponding to the read end of the process end detection
57 // pipe and close the write one
58 int GetEndProcReadFD()
60 const int fd
= pipeEndProcDetect
.Detach(wxPipe::Read
);
61 pipeEndProcDetect
.Close();
69 // the pid of the child process
72 // the associated process object or NULL
75 // pipe used for end process detection
76 wxPipe pipeEndProcDetect
;
79 // the input buffer bufOut is connected to stdout, this is why it is
80 // called bufOut and not bufIn
81 wxStreamTempInputBuffer
*bufOut
,
84 // the corresponding FDs, -1 if not redirected
87 #endif // wxUSE_STREAMS
90 // this function is called when the process terminates from port specific
91 // callback function and is common to all ports (src/unix/utilsunx.cpp)
92 extern WXDLLIMPEXP_BASE
void wxHandleProcessTermination(wxEndProcessData
*proc_data
);
94 #endif // _WX_UNIX_EXECUTE_H