[BACK]Return to job.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/job.c between version 1.96 and 1.97

version 1.96, 2007/10/09 09:39:21 version 1.97, 2007/10/09 09:40:26
Line 186 
Line 186 
                                      * for a target. Should this number be                                       * for a target. Should this number be
                                      * 0, no shell will be executed. */                                       * 0, no shell will be executed. */
   
 /*  
  * Return values from JobStart.  
  */  
 #define JOB_RUNNING     0       /* Job is running */  
 #define JOB_ERROR       1       /* Error in starting the job */  
 #define JOB_FINISHED    2       /* The job is already finished */  
 #define JOB_STOPPED     3       /* The job is stopped */  
   
 #define SHELL_ECHO_OFF  "set -"  #define SHELL_ECHO_OFF  "set -"
 #define SHELL_ECHO_ON   "set -v"  #define SHELL_ECHO_ON   "set -v"
 #define SHELL_ERROR_ON  "set -e"  #define SHELL_ERROR_ON  "set -e"
Line 274 
Line 266 
 static void JobExec(Job *, char **);  static void JobExec(Job *, char **);
 static void JobMakeArgv(Job *, char **);  static void JobMakeArgv(Job *, char **);
 static void JobRestart(Job *);  static void JobRestart(Job *);
 static int JobStart(GNode *, int);  static void JobStart(GNode *, int);
 static char *JobOutput(Job *, char *, char *, int);  static char *JobOutput(Job *, char *, char *, int);
 static void JobDoOutput(Job *, bool);  static void JobDoOutput(Job *, bool);
 static void JobInterrupt(int, int);  static void JobInterrupt(int, int);
Line 1185 
Line 1177 
  *      Start a target-creation process going for the target described   *      Start a target-creation process going for the target described
  *      by the graph node gn.   *      by the graph node gn.
  *   *
  * Results:  
  *      JOB_ERROR if there was an error in the commands, JOB_FINISHED  
  *      if there isn't actually anything left to do for the job and  
  *      JOB_RUNNING if the job has been started.  
  *  
  * Side Effects:   * Side Effects:
  *      A new Job node is created and added to the list of running   *      A new Job node is created and added to the list of running
  *      jobs. PMake is forked and a child shell created.   *      jobs. PMake is forked and a child shell created.
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  */   */
 static int  static void
 JobStart(GNode *gn,             /* target to create */  JobStart(GNode *gn,             /* target to create */
     int flags)                  /* flags for the job to override normal ones.      int flags)                  /* flags for the job to override normal ones.
                                  * e.g. JOB_SPECIAL */                                   * e.g. JOB_SPECIAL */
Line 1337 
Line 1324 
                                 Make_Update(job->node);                                  Make_Update(job->node);
                         }                          }
                         free(job);                          free(job);
                         return JOB_FINISHED;                          return;
                 } else {                  } else {
                         free(job);                          free(job);
                         return JOB_ERROR;                          return;
                 }                  }
         } else {          } else {
                 (void)fflush(job->cmdFILE);                  (void)fflush(job->cmdFILE);
Line 1388 
Line 1375 
                 }                  }
                 JobExec(job, argv);                  JobExec(job, argv);
         }          }
         return JOB_RUNNING;  
 }  }
   
 static char *  static char *

Legend:
Removed from v.1.96  
changed lines
  Added in v.1.97