« Previous | Next » 

Revision d9f311d7

IDd9f311d78e983c98343954c85e7415115fb22885
Parent f71245a0
Child b2a1f511

Added by Iustin Pop over 15 years ago

Change IsPidFileAlive into ReadPidFile

We already have a function to test if a PID is alive, so it makes more
sense to use function composition that force calling (since we need to
read PIDs from files in other places too). Now IsProcessAlive returns
False for PIDs <= 0, since this is the error return from ReadPidFile.

The patch also adds a unittest for checking that WriteFile raises the
correct exception, and checks that an invalid or missing file causes
ReadPidFile to return zero. The unittest tearDown method will try to
cleanup the temp directory too (otherwise it leaves stuff after it).

Reviewed-by: ultrotter

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences