Minor code edit - move a bit of code into its own function

darcs-hash:20061120131224-ac50b-974496cc800377e4e06475491f89998b9640fbba.gz
This commit is contained in:
axel
2006-11-20 23:12:24 +10:00
parent 7b5649097f
commit bc1efb1556
3 changed files with 40 additions and 19 deletions

View File

@@ -1918,29 +1918,11 @@ static int read_i()
}
else
{
pid_t my_pid = getpid();
for( j = first_job; j; j=j->next )
{
if( ! job_is_completed( j ) )
{
if( j->pgid != my_pid )
{
killpg( j->pgid, SIGHUP );
}
else
{
process_t *p;
for( p = j->first_process; p; p=p->next )
{
if( ! p->completed )
{
if( p->pid )
{
kill( p->pid, SIGHUP );
}
}
}
}
job_signal( j, SIGHUP );
}
}
}