Skip to content

Commit

Permalink
hostcheck@schorschii: Fix ping for zombie processes (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
schorschii committed Feb 8, 2024
1 parent 9aface6 commit 258b252
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion hostcheck@schorschii/files/hostcheck@schorschii/desklet.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ MyDesklet.prototype = {
);
GLib.close(std_in);
GLib.close(std_err);
GLib.child_watch_add(GLib.PRIORITY_DEFAULT, child_pid, function(pid, wait_status, user_data) {
GLib.spawn_close_pid(child_pid);
});
if(!success) {
throw new Error(_('Error executing ping command!'));
}
Expand Down Expand Up @@ -144,7 +147,6 @@ MyDesklet.prototype = {
}
GLib.source_remove(tagWatchStdOut);
channel.shutdown(true);
GLib.spawn_close_pid(child_pid);
}
);
//this.ioChannelStdErr = GLib.IOChannel.unix_new(this.std_err);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"max-instances": "10",
"description": "Checks a host via ping or HTTP(S) and displays if it is available.",
"name": "Host Check",
"version": "1.5",
"version": "1.5.1",
"uuid": "hostcheck@schorschii"
}

0 comments on commit 258b252

Please sign in to comment.