How can I wait until a process ends?

Cheers,

Laitinen