[gnome-shell] NetworkAgent: use g_close() instead of GUnixInputStream
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] NetworkAgent: use g_close() instead of GUnixInputStream
- Date: Mon, 2 Sep 2013 16:45:26 +0000 (UTC)
commit a27b44a3c242abc79ffce490a705ef2246e8c96b
Author: Giovanni Campagna <gcampagn redhat com>
Date: Mon Sep 2 09:59:01 2013 +0200
NetworkAgent: use g_close() instead of GUnixInputStream
We created the input stream just to close the FD, but GLib has
a handy close() wrapper, so we can use that instead.
https://bugzilla.gnome.org/show_bug.cgi?id=707269
js/ui/components/networkAgent.js | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js
index c83782f..189dc94 100644
--- a/js/ui/components/networkAgent.js
+++ b/js/ui/components/networkAgent.js
@@ -380,11 +380,7 @@ const VPNRequestHandler = new Lang.Class({
this._childPid = pid;
this._stdin = new Gio.UnixOutputStream({ fd: stdin, close_fd: true });
this._stdout = new Gio.UnixInputStream({ fd: stdout, close_fd: true });
- // We need this one too, even if don't actually care of what the process
- // has to say on stderr, because otherwise the fd opened by g_spawn_async_with_pipes
- // is kept open indefinitely
- let stderrStream = new Gio.UnixInputStream({ fd: stderr, close_fd: true });
- stderrStream.close(null);
+ GLib.close(stderr);
this._dataStdout = new Gio.DataInputStream({ base_stream: this._stdout });
if (this._newStylePlugin)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]