Process Detection This needs a fair amount of work, takes a lot of assumptions, and most likely won't do what you want.