title: Using c++ function pointer as signal handler.
body: <p>I'd like to add new handler to signal SIGUSR1 in my code. here's <code>signal</code> signature form header file <code>signal.h</code> : </p>
  
  <p><code>void   (*signal(int, void (*)(int)))(int);</code></p>
  
  <p>My handler is a member function, so I'm using <code>std::bind</code> to make the function fit in <code>signal</code> accepted input. </p>
  
  <pre><code>myclass::my_handler(int x);
  </code></pre>
  
  <p>Here's my conversion of the member function to <code>signal</code> accepted input: </p>
  
  <pre><code>std::bind(&amp;myclass::my_handler, this, std::placeholders::_1); 
  </code></pre>
  
  <p>However, <code>std::bind</code> return the c++ representation of function pointer (a.k.a <code>std::function&lt;void(int)&gt;</code>) and I need the C representation which is <code>(void)(*)(int)</code>.</p>
  
  <p>Should I do the casting forcefully, or perhaps there's c++ alternative for <code>signal</code> ? </p>
  
  <p>Thanks </p>