shill: vpn: Spawn the OpenVPN process when tunnel index becomes available.
BUG=chromium-os:27373
TEST=unit tests
Change-Id: Ie946e4275beff4d5ac176413cc219dbe52356b28
Reviewed-on: https://gerrit.chromium.org/gerrit/17407
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/glib.cc b/glib.cc
index 7717adc..a2e9e07 100644
--- a/glib.cc
+++ b/glib.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -197,6 +197,29 @@
error);
}
+gboolean GLib::SpawnAsyncWithPipesCWD(gchar **argv,
+ gchar **envp,
+ GSpawnFlags flags,
+ GSpawnChildSetupFunc child_setup,
+ gpointer user_data,
+ GPid *child_pid,
+ gint *standard_input,
+ gint *standard_output,
+ gint *standard_error,
+ GError **error) {
+ return g_spawn_async_with_pipes(NULL,
+ argv,
+ envp,
+ flags,
+ child_setup,
+ user_data,
+ child_pid,
+ standard_input,
+ standard_output,
+ standard_error,
+ error);
+}
+
void GLib::SpawnClosePID(GPid pid) {
g_spawn_close_pid(pid);
}