I had the same question and found following solution in linux: write a script,
#!/bin/bash
avrdude=ps -C avrdude | tail -n 1 | head -c 7
kill $avrdude
#!/bin/bash
avrdude=`ps -C avrdude | tail -n 1 | head -c 7`
kill $avrdude
store it and connect it with a shortcut