GNOME Bugzilla – Bug 641387
panel does not set process group on started processes (setpgid)
Last modified: 2020-11-06 20:23:41 UTC
as a process starter, it should call setpgid(pid, pid) on the spawned children. This allows to distinguish between processes that belong together or not. Currently every started process from the panel has the same task group id. # ps xaf -o pid,session,pgid,group,args should show different pgid entries.
We'd need support from gio to do this, since we usually spawn processes through gio API. Can you maybe file a bug against glib/gio for this?
does gio not return the pid of a spawned process ?
(In reply to comment #2) > does gio not return the pid of a spawned process ? We have not used it, be we can get the child pid. We use either g_spawn_async or g_spawn_async_with_pipes. The former call the second one without pipes, so both are basically the same.
Well, our use of GSpawn is nothing compared to g_app_info_launch_uris(). That's where the real issue lives.
(In reply to comment #4) > Well, our use of GSpawn is nothing compared to g_app_info_launch_uris(). That's > where the real issue lives. I understand correctly, it is a limitation of GDesktopAppInfo, which does not get the child pid when it calls g_spawn_async in g_desktop_app_info_launch_uris. (Which I think the interface we finally use). If we were using just g_app_info_launch(), which would have access to GIO_LAUNCHED_DESKTOP_FILE_PID. http://git.gnome.org/browse/glib/tree/gio/gdesktopappinfo.c#n1117
tbh I am not really convinced that the processes we spawn from gnome-session should really be their own process groups. I kinda like the fact that killing gnome-shell's process group delivers a signal to all processes of the session.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/gnome-panel/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.