previous | start | next

tsh.c and job control - (continued)

 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!



previous | start | next