title: How to get process serial number of current running process
body: <p>In OS X 10.9 and below, we can get the process serial number of the current running process with:</p>
  
  <pre><code>ProcessSerialNumber pen;
  GetCurrentProcess( &amp;psn );
  </code></pre>
  
  <p>However, GetCurrentProcess() is now deprecated and I'm unsure how to find a process' serial number with NSRunningApplication.</p>