blob: 13545acbf6f1426c45c74521ec54dbb60cf9a6c5 [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 Petkov3258a812011-06-23 11:28:45 -07009GLib::~GLib() {}
10
Darin Petkov92c43902011-06-09 20:46:06 -070011guint GLib::ChildWatchAdd(GPid pid,
12 GChildWatchFunc function,
13 gpointer data) {
14 return g_child_watch_add(pid, function, data);
15}
16
17gboolean GLib::SourceRemove(guint tag) {
18 return g_source_remove(tag);
19}
20
Darin Petkovf7897bc2011-06-08 17:13:36 -070021gboolean GLib::SpawnAsync(const gchar *working_directory,
22 gchar **argv,
23 gchar **envp,
24 GSpawnFlags flags,
25 GSpawnChildSetupFunc child_setup,
26 gpointer user_data,
27 GPid *child_pid,
28 GError **error) {
29 return g_spawn_async(working_directory,
30 argv,
31 envp,
32 flags,
33 child_setup,
34 user_data,
35 child_pid,
36 error);
37}
38
Darin Petkov92c43902011-06-09 20:46:06 -070039void GLib::SpawnClosePID(GPid pid) {
40 g_spawn_close_pid(pid);
41}
42
Darin Petkovf7897bc2011-06-08 17:13:36 -070043} // namespace shill