title: Checking for Linux capabilities to set thread priority
body: <p>I have a C++ application that uses <code>pthread_setschedparam()</code> to set thread priority. Inside a docker container this fails with EPERM.</p>
  
  <p>How can I detect if my process has the necessary capabilities to set thread priority ?</p>