diff -Naur Thunar-0.9.0/thunar-vfs/thunar-vfs-exec.c Thunar-0.9.0.tpg/thunar-vfs/thunar-vfs-exec.c --- Thunar-0.9.0/thunar-vfs/thunar-vfs-exec.c 2007-12-02 13:46:33.000000000 +0000 +++ Thunar-0.9.0.tpg/thunar-vfs/thunar-vfs-exec.c 2007-12-12 23:34:34.000000000 +0000 @@ -324,8 +324,10 @@ if (startup_data->watch_id != 0) g_source_remove (startup_data->watch_id); - /* close the PID */ - g_spawn_close_pid (startup_data->pid); + /* make sure we don't leave zombies (see bug #2983 for details) */ + g_child_watch_add_full (G_PRIORITY_LOW, startup_data->pid, + (GChildWatchFunc) g_spawn_close_pid, + NULL, NULL); /* release the startup data */ _thunar_vfs_slice_free (TvsnStartupData, startup_data); @@ -513,6 +515,12 @@ startup_data->pid = pid; } } + else if (G_LIKELY (succeed)) + { + /* make sure we don't leave zombies (see bug #2983 for details) */ + g_child_watch_add_full (G_PRIORITY_LOW, pid, (GChildWatchFunc) g_spawn_close_pid, NULL, NULL); + + } /* release the sn display */ if (G_LIKELY (sn_display != NULL))