You can cause KSnapshot to exit by using the exit command, as shown below.
exit
$ dcop ksnapshot-23151 interface exit
$