aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/proc.c b/proc.c
index 259295b0..3b134b7c 100644
--- a/proc.c
+++ b/proc.c
@@ -488,7 +488,6 @@ void job_handle_signal ( int signal, siginfo_t *info, void *con )
got_signal = 1;
// write( 2, "got signal\n", 11 );
-
while(1)
{
@@ -846,7 +845,6 @@ static void read_try( job_t *j )
if( d->io_mode == IO_BUFFER )
{
buff=d;
-
}
}
@@ -883,6 +881,15 @@ static void read_try( job_t *j )
}
+/**
+ Give ownership of the terminal to the specified job.
+
+ \param j The job to give the terminal to.
+
+ \param cont If this variable is set, we are giving back control to
+ a job that has previously been stopped. In that case, we need to
+ set the terminal attributes to those saved in the job.
+ */
static int terminal_give_to_job( job_t *j, int cont )
{
@@ -912,7 +919,9 @@ static int terminal_give_to_job( job_t *j, int cont )
}
/**
- Returns contol of the terminal to the shell
+ Returns contol of the terminal to the shell, and saves the terminal
+ attribute state to the job, so that we can restore the terminal
+ ownership to the job at a later time .
*/
static int terminal_return_from_job( job_t *j)
{