postCommands = Targ_FindNode(".END", NULL, TARG_CREATE);
postCommands = Targ_FindNode(".END", TARG_CREATE);
Job_Init(maxproc, maxlocal)    int 	  maxproc;  /* the greatest number of jobs which may be			     * running at one time */    int 	  maxlocal; /* the greatest number of local jobs which may			     * be running at once. */{    GNode	  *begin;     /* node for commands to do at the very start */    int 	  tfd;    (void)strcpy(tfile, TMPPAT);    if ((tfd = mkstemp(tfile)) == -1)	Punt("Cannot create temp file: %s", strerror(errno));    else	(void)close(tfd);    Lst_Init(&jobs);    Lst_Init(&stoppedJobs);    maxJobs =	  maxproc;    maxLocal =	  maxlocal;    nJobs =	  0;    nLocal =	  0;    jobFull =	  FALSE;    aborting =	  0;    errors =	  0;    lastNode =	  NULL;    if (maxJobs == 1#ifdef REMOTE	|| noMessages#endif		     ) {	/*	 * If only one job can run at a time, there's no need for a banner,	 * no is there?	 */	targFmt = "";    } else {	targFmt = TARG_FMT;    }    if (shellPath == NULL) {	/*	 * The user didn't specify a shell to use, so we are using the	 * default one... Both the absolute path and the last component	 * must be set. The last component is taken from the 'name' field	 * of the default shell description pointed-to by commandShell.	 * All default shells are located in _PATH_DEFSHELLDIR.	 */	shellName = commandShell->name;	shellPath = str_concat(_PATH_DEFSHELLDIR, shellName, '/');    }    if (commandShell->exit == NULL) {	commandShell->exit = "";    }    if (commandShell->echo == NULL) {	commandShell->echo = "";    }    /*     * Catch the four signals that POSIX specifies if they aren't ignored.     * JobPassSig will take care of calling JobInterrupt if appropriate.     */    if (signal(SIGINT, SIG_IGN) != SIG_IGN) {	(void)signal(SIGINT, JobPassSig);    }    if (signal(SIGHUP, SIG_IGN) != SIG_IGN) {	(void)signal(SIGHUP, JobPassSig);    }    if (signal(SIGQUIT, SIG_IGN) != SIG_IGN) {	(void)signal(SIGQUIT, JobPassSig);    }    if (signal(SIGTERM, SIG_IGN) != SIG_IGN) {	(void)signal(SIGTERM, JobPassSig);    }    /*     * There are additional signals that need to be caught and passed if     * either the export system wants to be told directly of signals or if     * we're giving each job its own process group (since then it won't get     * signals from the terminal driver as we own the terminal)     */#if defined(RMT_WANTS_SIGNALS) || defined(USE_PGRP)    if (signal(SIGTSTP, SIG_IGN) != SIG_IGN) {	(void)signal(SIGTSTP, JobPassSig);    }    if (signal(SIGTTOU, SIG_IGN) != SIG_IGN) {	(void)signal(SIGTTOU, JobPassSig);    }    if (signal(SIGTTIN, SIG_IGN) != SIG_IGN) {	(void)signal(SIGTTIN, JobPassSig);    }    if (signal(SIGWINCH, SIG_IGN) != SIG_IGN) {	(void)signal(SIGWINCH, JobPassSig);    }#endif    begin = Targ_FindNode(".BEGIN", NULL, TARG_NOCREATE);    if (begin != NULL) {	JobStart(begin, JOB_SPECIAL, (Job *)0);	while (nJobs) {	    Job_CatchOutput();#ifndef RMT_WILL_WATCH	    Job_CatchChildren(!usePipes);#endif /* RMT_WILL_WATCH */	}    }    postCommands = Targ_FindNode(".END", NULL, TARG_CREATE);}