Applications may end up allocating a bunch of shmfence objects, each
of which uses a file descriptor, which must be kept open lest some
other client ask for a copy of it later on.
Lacking an API that can turn a memory mapping back into a file
descriptor, about the best we can do is push the file d
Alan Coopersmith 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);
>
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)
Daniel Stone writes:
> ITYM F_DUPFD.
heh. the code, at least, is correct :-)
> In either case, would be nice to make this an os/
> function instead,
Yes, could be an OS function.
> so we can also do this for input devices.
input devices need to be in the select mask though.
--
keith.pack..
Hi,
On 22 November 2013 06:19, Keith Packard wrote:
> Applications may end up allocating a bunch of shmfence objects, each
> of which uses a file descriptor, which must be kept open lest some
> other client ask for a copy of it later on.
>
> Lacking an API that can turn a memory mapping back into
Applications may end up allocating a bunch of shmfence objects, each
of which uses a file descriptor, which must be kept open lest some
other client ask for a copy of it later on.
Lacking an API that can turn a memory mapping back into a file
descriptor, about the best we can do is push the file d