summaryrefslogtreecommitdiff
path: root/xnest-plugin/NewNDest.c
diff options
context:
space:
mode:
Diffstat (limited to 'xnest-plugin/NewNDest.c')
-rw-r--r--xnest-plugin/NewNDest.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xnest-plugin/NewNDest.c b/xnest-plugin/NewNDest.c
index 52b038c..00c1b1c 100644
--- a/xnest-plugin/NewNDest.c
+++ b/xnest-plugin/NewNDest.c
@@ -59,7 +59,14 @@ RxpNew(PluginInstance *This)
void
RxpDestroy(PluginInstance *This)
{
+ int status;
+
/* kill child process */
- kill(This->child_pid, SIGKILL);
+ kill(This->child_pid, SIGTERM);
+
+ /* ... and fetch the status (to avoid dead process childs
+ * floating around) */
+ waitpid(This->child_pid, &status, 0);
+
RxpFreeXnestDisplayNumber(This->display_num);
}