Renamed poll() to isRunning() and cleaned up the Unix code.