## VteReaper VteReaper — A singleton object which catches `SIGCHLD` signals and converts them into GObject-style "child-exited" signals |

## Functions

int | vte_reaper_add_child ()
VteReaper * | vte_reaper_get ()

## Signals

void | child-exited | Run Last

## Types and Values

| VteReaper

## Object Hierarchy

        GObject
        ╰── VteReaper

## Description

Because an application may need to be notified when child processes exit, and because there is only one `SIGCHLD` handler, the VteTerminal widget relies on a VteReaper to watch for `SIGCHLD` notifications and retrieve the exit status of child processes which have exited. When glib provides child_watch functionality, the VteReaper merely acts as a proxy for glib's own functionality.

Since 0.11.11

## Functions

### vte_reaper_add_child ()

    int
    vte_reaper_add_child (GPid pid);

`vte_reaper_add_child` is deprecated and should not be used in newly-written code.

Ensures that child-exited signals will be emitted when `pid` exits. This is necessary for correct operation when running with glib versions >= 2.4.

#### Parameters

pid | the ID of a child process which will be monitored |

#### Returns

the new source ID

Since 0.11.11

### vte_reaper_get ()

    VteReaper *
    vte_reaper_get (void);

`vte_reaper_get` is deprecated and should not be used in newly-written code.

Finds the address of the global VteReaper object, creating the object if necessary.

#### Returns

the global VteReaper object, which should not be unreffed.

## Types and Values

### VteReaper

    typedef struct _VteReaper VteReaper;

`VteReaper` is deprecated and should not be used in newly-written code.

The reaper object.

## Signal Details

### The `“child-exited”` signal

    void
    user_function (VteReaper *vtereaper,
                   gint       arg1,
                   gint       arg2,
                   gpointer   user_data)

Emitted when the VteReaper object detects that a child of the current process has exited.

#### Parameters

vtereaper | the object which received the signal |
arg1 | the process ID of the exited child |
arg2 | the status of the exited child, as returned by `waitpid()` |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since 0.11.11