Re: fdwalk

2018-03-08 Thread Philip Withnall
On Fri, 2018-01-12 at 13:15 +, Markus Teich via gtk-devel-list
wrote:
> 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.

Philip

signature.asc
Description: This is a digitally signed message part
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: fdwalk

2018-01-29 Thread Philip Withnall
Hey,

The general answer to this kind of question is ’because nobody has
needed it’. If you can demonstrate a need for a public fdwalk()
implementation, which would be used by multiple apps, for a purpose
which can’t just be served by GSubprocess or g_spawn_*(), then please
file a bug about it on https://bugzilla.gnome.org/enter_bug.cgi?product
=glib.

Philip

On Mon, 2018-01-29 at 14:40 +, Markus Teich via gtk-devel-list
wrote:
> Heyho,
> 
> I'm going to unsubscribe from the list now to avoid noise. If someone
> gets interested in this, please CC me in any response. Thanks!
> 
> --Markus
> 
> 
> On Mon, Jan 15, 2018 at 4:46 PM Markus Teich  oogle.com> wrote:
> > 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.
> > 
> > --Markus
> > 
> > 
> > ___
> > gtk-devel-list mailing list
> > gtk-devel-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/gtk-devel-list

signature.asc
Description: This is a digitally signed message part
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: fdwalk

2018-01-29 Thread Markus Teich via gtk-devel-list
Heyho,

I'm going to unsubscribe from the list now to avoid noise. If someone gets
interested in this, please CC me in any response. Thanks!

--Markus


On Mon, Jan 15, 2018 at 4:46 PM Markus Teich <
mteich+gtk-devel-l...@google.com> wrote:

> 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.
>
> --Markus
>
>
> --
> Google Germany GmbH, Erika-Mann-Str. 33, 80636 München, Geschäftsführer:
> Paul Manicle, Halimah DeLaine Prado, Registergericht und -nummer: Hamburg,
> HRB 86891, Sitz der Gesellschaft: Hamburg
> This e-mail is confidential. If you received this communication by
> mistake, please don't forward it to anyone else, please erase all copies
> and attachments, and please let me know that it has gone to the wrong
> person.
>
-- 
Google Germany GmbH, Erika-Mann-Str. 33, 80636 München, Geschäftsführer:
Paul Manicle, Halimah DeLaine Prado, Registergericht und -nummer: Hamburg,
HRB 86891, Sitz der Gesellschaft: Hamburg
This e-mail is confidential. If you received this communication by mistake,
please don't forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list