Patent ID: 8910165

Claim:
A method comprising: generating a group of threads in a process, wherein each thread among the group of threads has a respective thread identifier (ID); opening a thread entity for a first thread among the group of threads, wherein the thread entity is one of a file descriptor and a socket descriptor; specifying, in agreement with an associated open mode privilege, one or more levels of access to the thread entity for all other threads among the group of threads; storing in a table the thread ID of the first thread; upon determining that a certain thread among the group of threads is attempting to perform a specified operation on the thread entity, determining whether the thread ID of the certain thread matches the thread ID of the first thread stored in the table; upon determining that the thread ID of the certain thread matches the thread ID of the first thread, allowing the certain thread to perform the specified operation; upon determining that the thread ID of the certain thread does not match the thread ID of the first thread, determining whether the specified operation is allowed by the specified one or more levels of access; and upon determining that the specified operation is allowed by the specified one or more levels of access, allowing the certain thread to perform the specified operation.