[file-roller] Fixed bug #503240



commit d3a88133c7db521fc9ad820fd5f95523a177868b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Thu Apr 30 09:41:15 2009 +0200

    Fixed bug #503240
    
    Checks if pid is 0 before sending it to kill. Sending
    kill(0, SIGTERM) is evil because it kills every process in the
    same process group, including nautilus, gnome-session, etc.
---
 src/fr-process.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/fr-process.c b/src/fr-process.c
index e1ba764..f7768ce 100644
--- a/src/fr-process.c
+++ b/src/fr-process.c
@@ -981,7 +981,7 @@ fr_process_stop_priv (FrProcess *process,
 	if (command_is_sticky (process, process->priv->current_command))
 		allow_sticky_processes_only (process, emit_signal);
 
-	else if (process->term_on_stop)
+	else if (process->term_on_stop && (process->priv->command_pid > 0))
 		kill (process->priv->command_pid, SIGTERM);
 
 	else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]