Changeset 0732183 in rtems-libbsd


Ignore:
Timestamp:
Mar 14, 2017, 6:15:34 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
fd86c091b97759106da7355ce1dd81ebe030e285, f020f08430150c1656a0ad0a1de13699db9b980b
Children:
0395c5d
Parents:
5f3722a
Message:

Fix SOCK_CLOEXEC with socket() and socketpair()

Remove SOCK_CLOEXEC flag to get a valid socket type, e.g. to avoid a
EPROTOTYPE in case of socket(..., SOCK_DGRAM | SOCK_CLOEXEC, ...).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/kern/uipc_syscalls.c

    r5f3722a r0732183  
    177177        oflag = 0;
    178178        fflag = 0;
    179 #ifndef __rtems__
    180179        if ((type & SOCK_CLOEXEC) != 0) {
    181180                type &= ~SOCK_CLOEXEC;
    182181                oflag |= O_CLOEXEC;
    183182        }
    184 #endif /* __rtems__ */
    185183        if ((type & SOCK_NONBLOCK) != 0) {
    186184                type &= ~SOCK_NONBLOCK;
     
    776774        oflag = 0;
    777775        fflag = 0;
    778 #ifndef __rtems__
    779776        if ((type & SOCK_CLOEXEC) != 0) {
    780777                type &= ~SOCK_CLOEXEC;
    781778                oflag |= O_CLOEXEC;
    782779        }
    783 #endif /* __rtems__ */
    784780        if ((type & SOCK_NONBLOCK) != 0) {
    785781                type &= ~SOCK_NONBLOCK;
Note: See TracChangeset for help on using the changeset viewer.