<p>I need to see if a given process id is running, and it must work in either Java or JRuby (preferably a Ruby solution).  It can be system dependent for Linux (specifically Debian and/or Ubuntu).</p>

<p>I already have the PID I am looking for, just need to see if it is currently running.</p>

<hr>

<p>UPDATE:</p>

<p>Thanks for all the responses everyone!  I appreciate it, however it's not QUITE what I'm looking for... I am hoping for something in a standard Ruby library (or Java, but preferably Ruby)... if no such library call exists, I will probably stick with the procfs solution I already have.</p>

From
my answer to this question
, I was thinking of just using procfs again, by checking if the given directory exists via File.exist? "/proc/#{pid}".  This worked in jirb:
```
irb(main):001:0> File.exist? "/proc/5555"
=> false
irb(main):002:0> File.exist? "/proc/7677"
=> true
```
However, I would still prefer to use a method that specifically exists to detect if a process is running... like Process.exist?(pid)... which unfortunately doesn't exist that I've seen.