Added reaping of child processes.

This commit is contained in:
Marcel Metz
2013-03-27 22:38:59 +01:00
parent 26869af633
commit deca5c0b40

View File

@@ -152,6 +152,11 @@ Sensors.prototype = {
new Gio.UnixOutputStream({fd: stdin, close_fd: true}).close(null);
new Gio.UnixInputStream({fd: stderr, close_fd: true}).close(null);
this._sensorsChildWatch = GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, Lang.bind(this, function(pid, status, requestObj) {
Shell.util_wifexited(status);
GLib.source_remove(this._sensorsChildWatch);
}));
this._sensorsReadStdout();
} catch(e){
global.log(e.toString());
@@ -171,6 +176,11 @@ Sensors.prototype = {
new Gio.UnixOutputStream({fd: stdin, close_fd: true}).close(null);
new Gio.UnixInputStream({fd: stderr, close_fd: true}).close(null);
this._hddtempChildWatch = GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, Lang.bind(this, function(pid, status, requestObj) {
Shell.util_wifexited(status);
GLib.source_remove(this._hddtempChildWatch);
}));
this._hddtempReadStdout();
} catch(e){
global.log(e.toString());