After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735213 - Deprecate pipe arguments to GLib.spawn_async
Deprecate pipe arguments to GLib.spawn_async
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks: 685373
 
 
Reported: 2014-08-22 09:11 UTC by Simon Feltman
Modified: 2018-01-10 20:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
g_spawn_async_with_pipes: Add flags for not creating pipes (4.32 KB, patch)
2017-11-18 17:58 UTC, Christoph Reiter (lazka)
none Details | Review

Description Simon Feltman 2014-08-22 09:11:00 UTC
GLib.spawn_async is implemented as a static binding wrapper around g_spawn_async_with_pipes(). The static wrapper accepts boolean arguments for standard_input, standard_output, and standard_error. When these boolean are passed as True, the function returns pipes instead of automatically redirecting them.

Since GLib.spawn_async_with_pipes (introspected function) works fine, we should deprecate the passing of the pipe flags to spawn_async() in preference for this function. This will give us the ability to eventually get rid of the static spawn_async() bindings and be left with introspection versions of spawn_async() and spawn_async_with_pipes().
Comment 1 Christoph Reiter (lazka) 2017-03-29 13:37:36 UTC
The problem here is that spawn_async_with_pipes changes behavior depending on if NULL is passed for the out args or not. And we always pass valid pointers for out args, making it impossible to get the other behavior.

To deprecate that part of spawn_async() we'd have to warn in case any of standard_input/standard_output/standard_error is falsy, which is currently the default.

What about trying to get three new flags into glib which disable returning the FDs even if a valid pointer is passed. Then we could replicate the current API.
Something like: G_SPAWN_STDERR_NO_PIPE, G_SPAWN_STDIN_NO_PIPE, G_SPAWN_STDOUT_NO_PIPE
Comment 2 Christoph Reiter (lazka) 2017-11-18 17:58:43 UTC
Created attachment 363979 [details] [review]
g_spawn_async_with_pipes: Add flags for not creating pipes

Here is what I had in mind.
Comment 3 GNOME Infrastructure Team 2018-01-10 20:45:35 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/81.