Do you want to run a program directly after some other process has ended? Use
"pwait pid && new_program"

-- Lars Engels <[email protected]>

@fbfortune Or "waitpid <pid> && new_program" for those on Linux.