PIDs / process management under Flatpak

Hi all. I have an interesting issue to solve. I have a commercial application ( an ETL framework ) that spawns jobs. The GUI is Gtk3, and everything runs inside flatpak ( the list of dependencies is HUGE and it’s easier to package everything only once ).

I’m writing a scheduler for it, which needs to be able to list PIDs, and check them against a list of PIDs that have previously been spawned. I can see that this will only work if the jobs were spawned in the same namespace as the process that’s currently listing the jobs … and similarly there would be no way to eg kill a job that was spawned under a different namespace.

The thing is that this is a multi-user app - ie many developers can log in ( RDP or broadway ), and the scheduler itself could be running under it’s own namespace, or under the namespace of a GUI instance that launched it.

What options do I have here? I understand that “by default” a process inside a container can’t see processes on the host. Can I override this behaviour, and have the PIDs in the container match those of the host?

Otherwise, I can see that I can enter an existing namespace with “flatpak enter”. I guess I could edit all the ways different parts of the app are launched from outside the container to use “flatpak enter” if there is an existing namespace. Would this be a sane approach? Any other ideas?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.