D-Bus  1.12.16
dbus-spawn.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 /* dbus-spawn.h Wrapper around fork/exec
3  *
4  * Copyright (C) 2002, 2003 Red Hat, Inc.
5  * Copyright (C) 2003 CodeFactory AB
6  *
7  * Licensed under the Academic Free License version 2.1
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 
25 #ifndef DBUS_SPAWN_H
26 #define DBUS_SPAWN_H
27 
28 #include <dbus/dbus-string.h>
29 #include <dbus/dbus-errors.h>
30 #include <dbus/dbus-watch.h>
31 
33 
34 typedef void (* DBusSpawnChildSetupFunc) (void *user_data);
35 
36 typedef struct DBusBabysitter DBusBabysitter;
37 
38 typedef void (* DBusBabysitterFinishedFunc) (DBusBabysitter *sitter,
39  void *user_data);
40 
41 typedef enum {
42  DBUS_SPAWN_REDIRECT_OUTPUT = (1 << 0),
43  DBUS_SPAWN_NONE = 0
44 } DBusSpawnFlags;
45 
47  const char *log_name,
48  char * const *argv,
49  char **env,
50  DBusSpawnFlags flags,
51  DBusSpawnChildSetupFunc child_setup,
52  void *user_data,
53  DBusError *error);
54 void _dbus_babysitter_set_result_function (DBusBabysitter *sitter,
55  DBusBabysitterFinishedFunc finished,
56  void *user_data);
62  DBusError *error);
64  int *status);
66  DBusAddWatchFunction add_function,
67  DBusRemoveWatchFunction remove_function,
68  DBusWatchToggledFunction toggled_function,
69  void *data,
70  DBusFreeFunction free_data_function);
71 void _dbus_babysitter_block_for_child_exit (DBusBabysitter *sitter);
72 
74 
75 #endif /* DBUS_SPAWN_H */