To check whether a process with a given ID is still running on unix, I would 
normally use the following C code ...

   if (kill(pid, 0) == 0)
      printf("alive");
   else
      printf("dead");

However, the return code from Process.kill() doesn't seem to match the system 
call.  Having a cursory look at the source in process.c (version 1.6.7), it 
looks like the value returned is the number of kill() calls that were 
successfully made.

Does anyone know of a way to achieve what I need ... ie, determine whether a 
process with the given ID still exists, or will I have to write a small C 
extension?

I realise I could do a popen of "ps" and parse the output, but that's pretty 
messy (and expensive) for such a simple task.

Thanks in advance.

Harry O.