Web lists-archives.com

Re: fdwalk

On Fri, 2018-01-12 at 13:15 +0000, Markus Teich via gtk-devel-list
> Heyho,
> I discovered you have a fdwalk implementation in glib/gspawn.c which
> is not exported as a usable symbol. Is there any reason for this? If
> not, I'd suggest exporting that symbol and maybe even another wrapper
> that takes a list of FDs to keep open instead of the callback pointer
> and closes all other ones. Closing all fds except some specific ones
> is a common pattern before exec()ing.

GLib provides higher-level subprocess handling functionality with
GSubprocess; the g_subprocess_launcher_take_fd() and
g_subprocess_launcher_set_child_setup() functions are relevant here.
I’m not sure there’s enough demand to expose an fdwalk() implementation
to everyone.


Attachment: signature.asc
Description: This is a digitally signed message part

gtk-devel-list mailing list