pid_t fgpid(struct job_t *jobs);
This function returns the pid of the foreground process if there is a foreground process.
If there currently is no foreground process, this function returns 0. So be careful!