bin/csh/proc.c
/*
 * pendjob - indicate that a job (set of commands) has been completed
 *	or is about to begin.
 */
indicate that a job (set of commands) has been completed
or is about to begin.
indicate that a job ( set of commands ) has been completed or is about to begin .
void
pendjob()
{
    register struct process *pp, *tp;
    if (pcurrjob && (pcurrjob->p_flags & (PFOREGND | PSTOPPED)) == 0) {
	pp = pcurrjob;
	while (pp->p_pid != pp->p_jobid)
	    pp = pp->p_friends;
	(void) fprintf(cshout, "[%d]", pp->p_index);
	tp = pp;
	do {
	    (void) fprintf(cshout, " %d", pp->p_pid);
	    pp = pp->p_friends;
	} while (pp != tp);
	(void) fputc('\n', cshout);
    }
    pholdjob = pcurrjob = 0;
}
void pendjob ( ) { register struct process * pp , * tp ; if ( pcurrjob && ( pcurrjob -> p_flags & ( PFOREGND | PSTOPPED ) ) == 0 ) { pp = pcurrjob ; while ( pp -> p_pid != pp -> p_jobid ) pp = pp -> p_friends ; ( void ) fprintf ( cshout , " " , pp -> p_index ) ; tp = pp ; do { ( void ) fprintf ( cshout , " " , pp -> p_pid ) ; pp = pp -> p_friends ; } while ( pp != tp ) ; ( void ) fputc ( ' \n ' , cshout ) ; } pholdjob = pcurrjob = 0 ; }
pendjob - indicate that a job (set of commands) has been completed
      or is about to begin.
pendjob - indicate that a job ( set of commands ) has been completed or is about to begin .