libassa  3.5.1
Public Member Functions | Private Attributes | List of all members
ASSA::fnode_t Class Reference

forknode_t class. More...

#include <Fork.h>

Public Member Functions

 fnode_t (pid_t pid_, Fork::state_t state_)
 Constructor. More...
 
pid_t getPID () const
 Retrieve child pid. More...
 
bool needKill () const
 Retrieve kill flag. More...
 

Private Attributes

pid_t m_pid
 Child pid. More...
 
Fork::state_t m_state
 Child state {kill, wait}. More...
 

Detailed Description

forknode_t class.

Definition at line 195 of file Fork.h.

Constructor & Destructor Documentation

◆ fnode_t()

ASSA::fnode_t::fnode_t ( pid_t  pid_,
Fork::state_t  state_ 
)
inline

Constructor.

Definition at line 198 of file Fork.h.

199  : m_pid(pid_), m_state(state_)
200  {
201  trace_with_mask("fnode_t::fnode_t",FORK);
202  }
#define trace_with_mask(s, m)
trace_with_mask() is used to trace function call chain in C++ program.
Definition: Logger.h:437
pid_t m_pid
Child pid.
Definition: Fork.h:219
Fork::state_t m_state
Child state {kill, wait}.
Definition: Fork.h:222
@ FORK
Class Fork messages
Definition: LogMask.h:47

References ASSA::FORK, and trace_with_mask.

Member Function Documentation

◆ getPID()

pid_t ASSA::fnode_t::getPID ( ) const
inline

Retrieve child pid.

Definition at line 205 of file Fork.h.

206  {
207  trace_with_mask("fnode_t::getPID",FORK);
208  return m_pid;
209  }

References ASSA::FORK, m_pid, and trace_with_mask.

◆ needKill()

bool ASSA::fnode_t::needKill ( ) const
inline

Retrieve kill flag.

Definition at line 212 of file Fork.h.

213  {
214  trace_with_mask("fnode_t::needKill",FORK);
215  return m_state == Fork::KILL_ON_EXIT ? true : false;
216  }
@ KILL_ON_EXIT
Kill all childer on exit.
Definition: Fork.h:92

References ASSA::FORK, ASSA::Fork::KILL_ON_EXIT, m_state, and trace_with_mask.

Member Data Documentation

◆ m_pid

pid_t ASSA::fnode_t::m_pid
private

Child pid.

Definition at line 219 of file Fork.h.

Referenced by getPID().

◆ m_state

Fork::state_t ASSA::fnode_t::m_state
private

Child state {kill, wait}.

Definition at line 222 of file Fork.h.

Referenced by needKill().


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