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 759197 - EBADFD is not available in POSIX standard
EBADFD is not available in POSIX standard
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
git master
Other FreeBSD
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-08 17:40 UTC by Ting-Wei Lan
Modified: 2015-12-08 17:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace EBADFD with EBADF (799 bytes, patch)
2015-12-08 17:44 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2015-12-08 17:40:14 UTC
EBADFD is not specified in POSIX standard, so it may be unavailable. Can we can replace it with EBADF?

Vte code:

vte::util::smart_fd fd(masterfd);
if (fd == -1) {
        errno = EBADFD;
        return -1;
}

Linux man pages:

EBADF           Bad file descriptor (POSIX.1)
EBADFD          File descriptor in bad state


-1 is an invalid file descriptor, not a valid file descriptor with bad state, so I think EBADF is better than EBADFD.
Comment 1 Ting-Wei Lan 2015-12-08 17:44:36 UTC
Created attachment 316965 [details] [review]
Replace EBADFD with EBADF

Using EBADF is more portable and correct because EBADFD means a file
descriptor in bad state, not an invalid file descriptor.
Comment 2 Christian Persch 2015-12-08 17:50:58 UTC
Comment on attachment 316965 [details] [review]
Replace EBADFD with EBADF

Sure :-)
Comment 3 Ting-Wei Lan 2015-12-08 17:53:17 UTC
Attachment 316965 [details] pushed as 1e564f9 - Replace EBADFD with EBADF