[anjuta] libanjuta: Make sure that anjuta-launcher never kills us
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] libanjuta: Make sure that anjuta-launcher never kills us
- Date: Fri, 26 Nov 2010 15:47:54 +0000 (UTC)
commit 596aa7c915b67d826b7abe501186822c4d28d7dc
Author: Johannes Schmid <jhs gnome org>
Date: Fri Nov 26 16:40:24 2010 +0100
libanjuta: Make sure that anjuta-launcher never kills us
launcher->priv->child_pid might be 0 is which case we would kill the anjuta process
libanjuta/anjuta-launcher.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libanjuta/anjuta-launcher.c b/libanjuta/anjuta-launcher.c
index 4496765..60e3883 100644
--- a/libanjuta/anjuta-launcher.c
+++ b/libanjuta/anjuta-launcher.c
@@ -461,7 +461,8 @@ anjuta_launcher_send_ptyin (AnjutaLauncher *launcher, const gchar * input_str)
void
anjuta_launcher_reset (AnjutaLauncher *launcher)
{
- if (anjuta_launcher_is_busy (launcher))
+ if (anjuta_launcher_is_busy (launcher) &&
+ launcher->priv->child_pid)
kill (launcher->priv->child_pid, SIGTERM);
}
@@ -475,7 +476,8 @@ anjuta_launcher_reset (AnjutaLauncher *launcher)
void
anjuta_launcher_signal (AnjutaLauncher *launcher, int sig)
{
- kill (launcher->priv->child_pid, sig);
+ if (launcher->priv->child_pid)
+ kill (launcher->priv->child_pid, sig);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]