Web lists-archives.com

Re: Can't launch apps, fork() returns ENOMEM

On Wed, 11 Apr 2018 at 14:02:57 -0600, Daniel Drake wrote:
> I was wrong in thinking that gspawn lets you say "run this binary, and
> here's the fd that you should use for stdout".

The interface for that is the newer GSubprocess and GSubprocessLauncher.

> So, in order to avoid needing gnome-shell's app_child_setup(), we
> would either need to extend the gspawn API to allow specific file
> descriptors to be passed in, or perhaps another option to consider is
> to have gdesktopappinfo call posix_spawn directly (instead of gspawn).

... or make GDesktopAppInfo use GSubprocess instead of g_spawn, and
have a way for GSubprocess to use posix_spawn instead of g_spawn
in the (hopefully common) case where its ChildData.child_setup_func
is NULL.

gtk-devel-list mailing list