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 624463 - gio assumes kernel support for SOCK_CLOEXEC
gio assumes kernel support for SOCK_CLOEXEC
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-07-15 14:32 UTC by Julien Cristau
Modified: 2010-07-15 22:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.02 KB, patch)
2010-07-15 14:32 UTC, Julien Cristau
committed Details | Review

Description Julien Cristau 2010-07-15 14:32:24 UTC
Created attachment 165967 [details] [review]
proposed patch

When SOCK_CLOEXEC is defined at build time, gio uses it when calling socket().  However if the kernel it's running on is older, this fails with EINVAL.  Attached patch makes it fall back to the non-CLOEXEC behaviour in this case.

This bug was causing failures in vala's test suite on Debian's autobuilders, running 2.6.26, see e.g. https://buildd.debian.org/fetch.cgi?pkg=vala&arch=i386&ver=0.9.3-1&stamp=1279137595&file=log&as=raw

Cheers,
Julien
Comment 1 Colin Walters 2010-07-15 19:56:53 UTC
Review of attachment 165967 [details] [review]:

This patch could use a comment like /* fall back on older kernels */ , but other than that looks fine to me.
Comment 2 Dan Winship 2010-07-15 22:12:05 UTC
committed with a comment as Colin suggested. Thanks.