When porting Xfrun to 4ui, the following function was called. static void xfrun_spawn_child_setup(gpointer data) { #if !defined(G_OS_WIN32) && defined(HAVE_SETSID) setsid(); #endif } I used gdk_spawn_on_screen directly, so not an issues for xfrun, but do we need something like this in xfce_spawn?
No -- IIRC waitpid() won't work after you call setsid() since that ends up creating a fresh process group and (I think) reparents the child pid. The setsid() in xfrun might actually be unnecessary...