View | Details | Raw Unified | Return to issue 53148
Collapse All | Expand All

(-)dmake/unix/runargv.c (-11 / +10 lines)
Lines 157-176 Link Here
157
   int          st_pq = 0; /* Current _exec_shell target process queue */
157
   int          st_pq = 0; /* Current _exec_shell target process queue */
158
   char         **argv;
158
   char         **argv;
159
159
160
   if( _running(target) != -1 /*&& Max_proc != 1*/ ) {
161
      /* The command will be executed when the previous recipe
162
       * line completes. */
163
      _attach_cmd( cmd, group, ignore, target, last, shell );
164
      return(1);
165
   }
166
167
   /* Special handling for the shell function macro is required. If the currend
160
   /* Special handling for the shell function macro is required. If the currend
168
    * command is called as part of a shell escape in a recipe make sure that all
161
    * command is called as part of a shell escape in a recipe make sure that all
169
    * previous recipe lines of this target have finished. */
162
    * previous recipe lines of this target have finished. */
170
   if( Is_exec_shell && (st_pq = _running(Shell_exec_target)) != -1 ) {
163
   if( Is_exec_shell ) {
171
      Is_exec_shell=FALSE;
164
      if( (st_pq = _running(Shell_exec_target)) != -1 )
172
      Wait_for_child(FALSE, _procs[st_pq].pr_pid);
165
	 Wait_for_child(FALSE, _procs[st_pq].pr_pid);
173
      Is_exec_shell=TRUE;
166
   } else {
167
      if( _running(target) != -1 /*&& Max_proc != 1*/ ) {
168
	 /* The command will be executed when the previous recipe
169
	  * line completes. */
170
	 _attach_cmd( cmd, group, ignore, target, last, shell );
171
	 return(1);
172
      }
174
   }
173
   }
175
174
176
	/*  Any Fatal call can potentially loop by recursion because we
175
	/*  Any Fatal call can potentially loop by recursion because we

Return to issue 53148