title: Kill a process in ruby
body: <p>I use this code to kill a process with a PID file:</p>
  
  <pre><code>Process.kill 15, File.read('/tmp/pidfile').to_i
  </code></pre>
  
  <p>But the following two examples never work, when i try:</p>
  
  <pre><code>system "kill `cat /tmp/file.pid`"
  </code></pre>
  
  <p>or </p>
  
  <pre><code>`kill \`cat /tmp/pidfile\``
  </code></pre>
  
  <p>output is:</p>
  
  <pre><code>sh: 1: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
  kill -l [exitstatus]
  </code></pre>
  
  <p>Is there a problem with the backstick ? because in bash this works perfectly:</p>
  
  <pre><code>kill `cat /tmp/file.pid`
  </code></pre>