blob: bf1cda778614a228b6b67293ebe7f6e265100b93 [file] [log] [blame]
Darin Petkovf7897bc2011-06-08 17:13:36 -07001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "shill/glib.h"
6
7namespace shill {
8
Darin Petkov92c43902011-06-09 20:46:06 -07009guint GLib::ChildWatchAdd(GPid pid,
10 GChildWatchFunc function,
11 gpointer data) {
12 return g_child_watch_add(pid, function, data);
13}
14
15gboolean GLib::SourceRemove(guint tag) {
16 return g_source_remove(tag);
17}
18
Darin Petkovf7897bc2011-06-08 17:13:36 -070019gboolean GLib::SpawnAsync(const gchar *working_directory,
20 gchar **argv,
21 gchar **envp,
22 GSpawnFlags flags,
23 GSpawnChildSetupFunc child_setup,
24 gpointer user_data,
25 GPid *child_pid,
26 GError **error) {
27 return g_spawn_async(working_directory,
28 argv,
29 envp,
30 flags,
31 child_setup,
32 user_data,
33 child_pid,
34 error);
35}
36
Darin Petkov92c43902011-06-09 20:46:06 -070037void GLib::SpawnClosePID(GPid pid) {
38 g_spawn_close_pid(pid);
39}
40
Darin Petkovf7897bc2011-06-08 17:13:36 -070041} // namespace shill