blocxx
BLOCXX_NAMESPACE::WinExec::WinSystemPreExec Class Reference

#include <WinExec.hpp>

Inheritance diagram for BLOCXX_NAMESPACE::WinExec::WinSystemPreExec:
BLOCXX_NAMESPACE::Exec::PreExec

Public Member Functions

 WinSystemPreExec ()
 
virtual bool keepStd (int d) const
 
virtual void call (pipe_pointer_t const pparr[])
 This function is called between fork and exec in the spawn() function.
 
- Public Member Functions inherited from BLOCXX_NAMESPACE::Exec::PreExec
 PreExec (bool precompute_max_descriptors=false)
 
virtual ~PreExec ()
 
void closeDescriptorsOnExec (std::vector< bool > const &keep)
 For calling from PreExec::call.
 

Additional Inherited Members

- Public Types inherited from BLOCXX_NAMESPACE::Exec::PreExec
typedef ::BLOCXX_NAMESPACE::UnnamedPipepipe_pointer_t
 
- Static Public Member Functions inherited from BLOCXX_NAMESPACE::Exec::PreExec
static void resetSignals ()
 For calling from PreExec::call.
 
static void closePipesOnExec (pipe_pointer_t const pparr[])
 For calling from PreExec::call.
 
static void setupStandardDescriptors (pipe_pointer_t const pparr[])
 For calling from PreExec::call.
 
static void setNewProcessGroup ()
 For calling from PreExec::call().
 
- Protected Attributes inherited from BLOCXX_NAMESPACE::Exec::PreExec
long m_max_descriptors
 

Detailed Description

Definition at line 69 of file WinExec.hpp.

Constructor & Destructor Documentation

◆ WinSystemPreExec()

BLOCXX_NAMESPACE::WinExec::WinSystemPreExec::WinSystemPreExec ( )
inline

Definition at line 73 of file WinExec.hpp.

Member Function Documentation

◆ call()

virtual void BLOCXX_NAMESPACE::WinExec::WinSystemPreExec::call ( pipe_pointer_t const pparr[])
inlinevirtual

This function is called between fork and exec in the spawn() function.

It must not allocate memory unless you can guarantee that there is only one thread running – on some platforms allocating memory between fork and exec when there were other threads running can result in a deadlock.

Any exception thrown of type PreExec::Error or derived from std::exception is reported in full back to the parent; any exception derived from PreExec::DontCatch is allowed to propagate out of Exec::spawn; and any other type of exception is reported as an unknown exception.

Parameters
pparran array pointer that can be passed to the static functions close_pipes_on_exec() and setup_std_descriptors(). It includes pipes for each of the standard descriptors, plus any additional pipes used by Exec::spawn for communicating between child and parent before the execve occurs.

Implements BLOCXX_NAMESPACE::Exec::PreExec.

Definition at line 77 of file WinExec.hpp.

◆ keepStd()

virtual bool BLOCXX_NAMESPACE::WinExec::WinSystemPreExec::keepStd ( int d) const
inlinevirtual
Returns
True if Process object returned by spawn() should contain one end of a pipe connected to standard descriptor d for the child process. False if standard descriptor d of child should be connected to /dev/null.
Precondition
0 <= d < 3.

Implements BLOCXX_NAMESPACE::Exec::PreExec.

Definition at line 75 of file WinExec.hpp.


The documentation for this class was generated from the following file: