[PATCH] miext: Move SyncShm FDs out of the way of clients
Keith Packard
keithp at keithp.com
Fri Nov 22 11:30:18 PST 2013
Alan Coopersmith <alan.coopersmith at oracle.com> writes:
> On 11/21/13 10:19 PM, Keith Packard wrote:
>> + newfd = fcntl(fd, F_DUPFD, MAXCLIENTS);
>
> Should probably do something like:
>
> #ifdef F_DUPFD_CLOEXEC
> newfd = fcntl(fd, F_DUPFD_CLOEXEC, MAXCLIENTS);
> #else
> newfd = fcntl(fd, F_DUPFD, MAXCLIENTS);
> #endif
> if (newfd < 0)
> return fd;
> #ifndef F_DUPFD_CLOEXEC
> fcntl(newfd, F_SETFD, FD_CLOEXEC);
> #endif
>
> so that we don't pass all those fds to xkbcomp when we fork it.
Of course, thanks.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20131122/7854809d/attachment.pgp>
More information about the xorg-devel
mailing list