I'm working on a simple shell for an os class that needs to be capable of running processes in the foreground and background. I have this working fine, but I need to be able to check if a process is done (using its pid) so I can keep a list of running background processes. Is there any simple way to do this?