KTorrent is unstable on my main machine, it crashes randomly. I wrote a little Bash script, I put in my crontab, to check if it runs and restart it when it doesn't:
let numproc=$(ps aux | grep -e "ktorrent$" | wc -l)
if [ $numproc -eq 0 ];
then
ktorrent
else
let numerr=$(ps aux | grep -e "--appname ktorrent" | grep -e "drkonqi" | wc -l)
if [ $numerr -eq 1 ];
then
let numproc=$(ps aux | grep -e "--appname ktorrent" | grep -e "drkonqi" | awk '{print $2}')