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 571890 - spawn_async tries to call child_setup even when None
spawn_async tries to call child_setup even when None
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: gobject
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-15 22:31 UTC by Timo Lindfors
Modified: 2009-02-16 18:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Timo Lindfors 2009-02-15 22:31:50 UTC
I this on armel debian gnu/linux unstable system and since it does not look like a distro specific bug I thought I should attach a copy here:

Package: python-gobject
Version: 2.14.2-1
Severity: normal

Steps to reproduce:
1) cat > testcase.py <<EOF
import gobject, os
gobject.spawn_async( [ "/bin/sleep", "4" ],
                     child_setup = None)
EOF
2) strace -e write -f python a.py

Expected results:
2) gobject forks and exec's sleep

Actual results:
2) gobject forks but then tries to call child_setup function even thought it is None
   as can be seen from strace output

Process 11653 attached (waiting for parent)
Process 11653 resumed (parent 11652 ready)
Process 11654 attached (waiting for parent)
Process 11652 suspended
Process 11654 resumed (parent 11653 ready)
[pid 11654] write(2, "TypeError"..., 9TypeError) = 9
[pid 11653] write(6, "\206-\0\0"..., 4 <unfinished ...>
[pid 11654] write(2, ": "..., 2: )        = 2
[pid 11654] write(2, "'NoneType' object is not callable"..., 33'NoneType' object is not callable) = 33
[pid 11654] write(2, "\n"..., 1
)        = 1
[pid 11653] <... write resumed> )       = 4
Process 11652 resumed
Process 11653 detached
[pid 11652] --- SIGCHLD (Child exited) @ 0 (0) ---
Process 11654 detached


-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: armel (armv4tl)

Kernel: Linux 2.6.28-GTA02_lindi-andy-tracking_b8b36e5ec3db71d5-mokodev (PREEMPT)
Locale: LANG=C, LC_CTYPE=fi_FI (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-gobject depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libffi5                       3.0.7-1    Foreign Function Interface library
ii  libglib2.0-0                  2.16.6-1   The GLib library of C routines
ii  python                        2.5.2-3    An interactive high-level object-o
ii  python-support                0.8.7      automated rebuilding support for P
ii  python2.5                     2.5.2-15   An interactive high-level object-o

python-gobject recommends no packages.

Versions of packages python-gobject suggests:
pn  python-gobject-dbg            <none>     (no description available)
Comment 1 Paul Pogonyshev 2009-02-16 18:09:44 UTC
Cannot reproduce with trunk and source code indicates it never calls child_setup if None.  As a workaround you may need to use 'child_setup = lambda x: None', because there will not be a fix 2.14 release.