Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::G::ChildWatchSource Class Reference

A child watch GSource C++ interface. More...

`#include <xfc/glib/main.hh>`

Inheritance diagram for Xfc::G::ChildWatchSource:

List of all members.

## Public Member Functions

Constructors

- ChildWatchSource (GPid pid)
    Constructs a new child watch source.
- ChildWatchSource (GPid pid, const WatchSlot &slot)
    Constructs a new child watch source.

Methods

- sigc::connection connect (const WatchSlot &slot)
    Connects the callback slot to the child watch source.

## Detailed Description

A child watch GSource C++ interface.

A slot connected to a ChildWatchSource is called when the child indicated by pid exits, at a default priority, G_PRIORITY_DEFAULT.

See also G::ChildWatchSignal.

## Constructor & Destructor Documentation

Xfc::G::ChildWatchSource::ChildWatchSource | ( | GPid | pid | ) |

Constructs a new child watch source.

Parameters:

  | pid | The process id of a child process to watch.

The source will not initially be associated with any main context and must be added to one with G::Source::attach() before it will be executed. Note that on platforms where GPid must be explicitely closed pid must not be closed while the source is still active (see G::Spawn::close_pid()). Typically, you will want to call G::Spawn::close_pid() in the callback slot method for the source.

To set the callback slot call set_callback(). To override the default priority PRIORITY_DEFAULT call set_priority().

Xfc::G::ChildWatchSource::ChildWatchSource | ( | GPid | pid,
|  | const WatchSlot & | slot
| ) |

Constructs a new child watch source.

Parameters:

  | pid | The process id of a child process to watch.
  | slot | The child watch callback slot, of type sigc::slot<void, GPid, int>.

The source will not initially be associated with any main context and must be added to one with G::Source::attach() before it will be executed. Note that on platforms where GPid must be explicitely closed pid must not be closed while the source is still active (see G::Spawn::close_pid()). Typically, you will want to call G::Spawn::close_pid() in the callback slot method for the source.

## Member Function Documentation

sigc::connection Xfc::G::ChildWatchSource::connect | ( | const WatchSlot & | slot | ) |

Connects the callback slot to the child watch source.

Parameters:

  | slot | The callback slot, of type sigc::slot<void, GPid, int>.

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

- libXFCcore/xfc/glib/main.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3