Artifact c004806a34aeb2326c01ecd553de3757f54b3cb073b933b70a4d95432cec29f4:
- File
src/OFKernelEventObserver+Private.h
— part of check-in
[1dbe9a4e4e]
at
2014-08-22 19:09:34
on branch trunk
— Retain sockets until after removal from observer
Not retaining them caused kevent() to be called on an invalid fd. (user: js, size: 955) [annotate] [blame] [check-ins using]
/* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFKernelEventObserver.h" @interface OFKernelEventObserver (OF_PRIVATE_CATEGORY) - (void)OF_addFileDescriptorForReading: (int)fd; - (void)OF_addFileDescriptorForWriting: (int)fd; - (void)OF_removeFileDescriptorForReading: (int)fd; - (void)OF_removeFileDescriptorForWriting: (int)fd; - (void)OF_processQueueAndStoreRemovedIn: (OFMutableArray*)removed; - (bool)OF_processCache; @end