title: what are the ways to create a file descriptor?
body: <p>The Wikipedia page for <a href="http://en.wikipedia.org/wiki/File_descriptor" rel="nofollow"><code>File Descriptor</code></a> lists the following system calls:</p>
  
  <pre><code> - open(), open64()
   - creat(), creat64()
   - socket()
   - accept()
   - socketpair()
   - epoll_create() (Linux only)
   - pipe()
   - signalfd() (Linux only)
   - eventfd() (Linux only)
  </code></pre>
  
  <p>Are there any other methods on other platforms, especially on <code>QNX</code>?</p>
  
  <p>I have a thread which is monitoring a bunch of sockets with a <code>poll()</code> call and receiving "Commands" from the sockets. Now I need to add the possibility to send such "Commands" from other threads running in the same process. I would like to avoid the overhead of writing into a pipe/socket within the same process if possible. </p>
  
  <p>Can anyone think of somehow monitoring a conditional variable using <code>poll()</code> for example?</p>