mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-14 00:14:14 +09:00
Added reaping of child processes.
This commit is contained in:
10
extension.js
10
extension.js
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user