Use of tcsetpgrp


 
Thread Tools Search this Thread
Top Forums Programming Use of tcsetpgrp
# 1  
Old 03-14-2009
Bug Use of tcsetpgrp

Dear friends,
kindly some one explain me the use of tcsetpgrp() function. I didn't understand it by reading man page.
# 2  
Old 03-14-2009
You probably do not need to worry about that, it is a function intended to be used by interactive shells with job control features. But briefly a job control shell keeps track of "jobs". A job might be something like:
program1 | program2 &
There the user just put a job in "the background". The job has two processes and the shell will arrange for them to be in the same "process group". This allow the shell to control the processes as a unit. If the user now types:
fg
the shell must bring the job into the foreground. It does this by invoking tcsetpgrp and then waiting for the job to finish.

I have omitted a lot of messy details but this is the gist of it.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question