## OGMJobExec OGMJobExec — A spawn that runs a command line |

## Functions

gdouble | (*OGMJobWatch) ()
OGMJobSpawn * | ogmjob_exec_new ()
OGMJobSpawn * | ogmjob_exec_newv ()
gint | ogmjob_exec_get_status ()
void | ogmjob_exec_add_watch ()
void | ogmjob_exec_add_watch_full ()

## Types and Values

struct | OGMJobExec

## Object Hierarchy

        GObject
        ╰── OGMJobSpawn
            ╰── OGMJobExec

## Includes

    #include <ogmjob-exec.h>

## Description

## Functions

### OGMJobWatch ()

    gdouble
    (*OGMJobWatch) (OGMJobExec *exec,
                    const gchar *buffer,
                    gpointer data);

Specifies the type of functions passed to `ogmjob_exec_add_watch()`, and `ogmjob_exec_add_watch_full()`.

#### Parameters

exec | An OGMJobExec |
buffer | The data read |
data | The user data |

#### Returns

The progress made, or -1

### ogmjob_exec_new ()

    OGMJobSpawn *
    ogmjob_exec_new (const gchar *command_line);

Creates a new OGMJobExec.

#### Parameters

command_line | A command line |

#### Returns

The new OGMJobExec

### ogmjob_exec_newv ()

    OGMJobSpawn *
    ogmjob_exec_newv (gchar **argv);

Creates a new OGMJobExec.

#### Parameters

argv | An argument vector |

#### Returns

The new OGMJobExec

### ogmjob_exec_get_status ()

    gint
    ogmjob_exec_get_status (OGMJobExec *exec);

Returns the execution status.

#### Parameters

exec | An OGMJobExec |

#### Returns

The execution status

### ogmjob_exec_add_watch ()

    void
    ogmjob_exec_add_watch (OGMJobExec *exec,
                           OGMJobWatch watch_func,
                           gpointer watch_data);

Invokes `watch_func` each time data is available on stdin or stdout.

#### Parameters

exec | An OGMJobExec |
watch_func | An OGMJobWatch |
watch_data | User data |

### ogmjob_exec_add_watch_full ()

    void
    ogmjob_exec_add_watch_full (OGMJobExec *exec,
                                OGMJobWatch watch_func,
                                gpointer watch_data,
                                gboolean watch_out,
                                gboolean watch_err,
                                gboolean swapped);

Invokes `watch_func` each time data is available on stdin or stdout.

#### Parameters

exec | An OGMJobExec |
watch_func | An OGMJobWatch |
watch_data | User data |
watch_out | Whether to watch stdin |
watch_err | Whether to watch stdout |
swapped | Whether to swap exec and `watch_data` when calling `watch_func` |

## Types and Values

### struct OGMJobExec

    struct OGMJobExec;