You don't. It's not up to you when the plugin process should end, it's up to the browser. Chrome, for instance, keeps plugin processes alive for a short time to avoid thrashing if someone, say, reloads a page with the only instance of the plugin, or navigates between two pages with the same plugin.
Your bug isn't that the process is staying alive for a while, it's that it's crashing when it does exit. You should debug and fix your crash.