Fix killing of threads that haven't started
authorMichael Callahan <MCallahan@fusionio.com>
Thu, 14 Jul 2011 05:56:37 +0000 (07:56 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 14 Jul 2011 05:56:37 +0000 (07:56 +0200)
commit6aa2781630cf6f502d5e9177d9bd3432c1b5b964
tree2b395829db26366736241f4e10447c54b6fb8a4d
parent0f7ac781d5355aefe95e84cde5a80026ca7c501e
Fix killing of threads that haven't started

If there is a thread that has not started yet (for instance with a long
startdelay or a stonewall) then a SIGINT will fire off terminate_threads
which runs through all of the threads and calls kill(pid, SIGTERM).
However the threads that have not started yet have a pid of 0.  When you
call kill(0, SIGTERM) it kills the entire thread group which can extend
out of fio.  I have included a short patch which fixes this for me.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fio.c