diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-02-21 03:32:07 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-02-21 03:32:07 +0000 |
commit | c81abd17fbbbb37c4df13771b485e139c8ab71d9 (patch) | |
tree | 1bb26faf2739fedf5c469e9f73a4affea2ba6792 | |
parent | f57064cc07d872583f50a04b2421f214304cc483 (diff) | |
download | cmogstored-c81abd17fbbbb37c4df13771b485e139c8ab71d9.tar.gz |
While we're at it, explain the use of cloexec.
-rw-r--r-- | queue_common.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/queue_common.c b/queue_common.c index 40f523c..79a5869 100644 --- a/queue_common.c +++ b/queue_common.c @@ -10,15 +10,16 @@ */ static LIST_HEAD(queue_head, mog_queue) all_queues; -/* - * used only by queue_epoll.c, but should be usable with queue_kqueue.c - * in the future - */ struct mog_queue *mog_queue_init(int queue_fd) { struct mog_fd *mfd; struct mog_queue *q; + /* + * Do not bother with epoll_create1(EPOLL_CLOEXEC), + * there's no kqueue version of it. We only create epoll/kqueue + * descriptors before we'd ever fork anything + */ CHECK(int, 0, mog_set_cloexec(queue_fd, true)); mfd = mog_fd_init(queue_fd, MOG_FD_TYPE_QUEUE); |