Index: thunar-vfs/thunar-vfs-exec.c =================================================================== --- thunar-vfs/thunar-vfs-exec.c (revision 25736) +++ thunar-vfs/thunar-vfs-exec.c (working copy) @@ -25,6 +25,9 @@ #ifdef HAVE_SYS_TYPES_H #include #endif +#ifdef HAVE_SYS_WAIT_H +#include +#endif #ifdef HAVE_ERRNO_H #include @@ -337,6 +340,7 @@ gpointer data) { TvsnStartupData *startup_data = data; + gint ret, serrno; _thunar_vfs_return_if_fail (startup_data->sn_launcher != NULL); _thunar_vfs_return_if_fail (startup_data->watch_id != 0); @@ -346,6 +350,19 @@ sn_launcher_context_complete (startup_data->sn_launcher); sn_launcher_context_unref (startup_data->sn_launcher); startup_data->sn_launcher = NULL; + + /* check for zombie processes owned by thunar */ + serrno = errno; + while (1) + { + /* get the child process state without locking */ + ret = waitpid (WAIT_ANY, NULL, WNOHANG); + + /* exit if there is nothing to wait for */ + if (ret == 0 || ret < 0) + break; + } + errno = serrno; /* cancel the startup notification timeout */ g_source_remove (startup_data->timeout_id);