Is it possible to check if an application started with "exec" is still running?

I have an issue where I have to wait until the app has been closed.

sys_active won't help me here.

Regards,
Pegamode.