Print this page
make: remove maketool support


1127                 if (!nohang) {
1128                         (void) alarm(0);
1129                 }
1130                 if (pid <= 0) {
1131                         if (waiterr == EINTR) {
1132                                 if (waitflg) {
1133                                         continue;
1134                                 } else {
1135                                         return;
1136                                 }
1137                         } else {
1138                                 return;
1139                         }
1140                 }
1141                 for (rp = running_list;
1142                      (rp != NULL) && (rp->pid != pid);
1143                      rp = rp->next) {
1144                         ;
1145                 }
1146                 if (rp == NULL) {
1147                         if (send_mtool_msgs) {
1148                                 continue;
1149                         } else {
1150                                 fatal(catgets(catd, 1, 128, "Internal error: returned child pid not in running_list"));
1151                         }
1152                 } else {
1153                         rp->state = (WIFEXITED(status) && WEXITSTATUS(status) == 0) ? build_ok : build_failed;
1154                 }
1155                 nohang = true;
1156                 parallel_process_cnt--;
1157 
1158 #if defined (TEAMWARE_MAKE_CMN) && defined (MAXJOBS_ADJUST_RFE4694000)
1159                 if (job_adjust_mode == ADJUST_M2) {
1160                         if (m2_release_job()) {
1161                                 job_adjust_error();
1162                         }
1163                 }
1164 #endif
1165         }
1166 }
1167 
1168 /*
1169  *      finish_children(docheck)
1170  *
1171  *      Finishes the processing for all targets which were running


1821                         }
1822                         if ((length = strlen(*commands)) >= MAXPATHLEN) {
1823                                 tmp_wcs_buffer = ALLOC_WC(length + 1);
1824                                 (void) mbstowcs(tmp_wcs_buffer, *commands, length + 1);
1825                                 command = GETNAME(tmp_wcs_buffer, FIND_LENGTH);
1826                                 retmem(tmp_wcs_buffer);
1827                         } else {
1828                                 MBSTOWCS(wcs_buffer, *commands);
1829                                 command = GETNAME(wcs_buffer, FIND_LENGTH);
1830                         }
1831                         if ((command->hash.length > 0) &&
1832                             !silent_flag) {
1833                                 (void) printf("%s\n", command->string_mb);
1834                         }
1835                         result = dosys(command,
1836                                        ignore,
1837                                        false,
1838                                        false, /* bugs #4085164 & #4990057 */
1839                                        /* BOOLEAN(silent_flag && ignore), */
1840                                        always_exec, 
1841                                        (Name) NULL,
1842                                        false);
1843                         if (result == build_failed) {
1844                                 if (silent_flag) {
1845                                         (void) printf(catgets(catd, 1, 152, "The following command caused the error:\n%s\n"), command->string_mb);
1846                                 }
1847                                 if (!ignore) {
1848                                         _exit(1);
1849                                 }
1850                         }
1851                 }
1852                 _exit(0);
1853                 break;
1854         default:
1855                 break;
1856         }
1857         return childPid;
1858 }
1859 
1860 static void
1861 maybe_reread_make_state(void)
1862 {




1127                 if (!nohang) {
1128                         (void) alarm(0);
1129                 }
1130                 if (pid <= 0) {
1131                         if (waiterr == EINTR) {
1132                                 if (waitflg) {
1133                                         continue;
1134                                 } else {
1135                                         return;
1136                                 }
1137                         } else {
1138                                 return;
1139                         }
1140                 }
1141                 for (rp = running_list;
1142                      (rp != NULL) && (rp->pid != pid);
1143                      rp = rp->next) {
1144                         ;
1145                 }
1146                 if (rp == NULL) {



1147                         fatal(catgets(catd, 1, 128, "Internal error: returned child pid not in running_list"));

1148                 } else {
1149                         rp->state = (WIFEXITED(status) && WEXITSTATUS(status) == 0) ? build_ok : build_failed;
1150                 }
1151                 nohang = true;
1152                 parallel_process_cnt--;
1153 
1154 #if defined (TEAMWARE_MAKE_CMN) && defined (MAXJOBS_ADJUST_RFE4694000)
1155                 if (job_adjust_mode == ADJUST_M2) {
1156                         if (m2_release_job()) {
1157                                 job_adjust_error();
1158                         }
1159                 }
1160 #endif
1161         }
1162 }
1163 
1164 /*
1165  *      finish_children(docheck)
1166  *
1167  *      Finishes the processing for all targets which were running


1817                         }
1818                         if ((length = strlen(*commands)) >= MAXPATHLEN) {
1819                                 tmp_wcs_buffer = ALLOC_WC(length + 1);
1820                                 (void) mbstowcs(tmp_wcs_buffer, *commands, length + 1);
1821                                 command = GETNAME(tmp_wcs_buffer, FIND_LENGTH);
1822                                 retmem(tmp_wcs_buffer);
1823                         } else {
1824                                 MBSTOWCS(wcs_buffer, *commands);
1825                                 command = GETNAME(wcs_buffer, FIND_LENGTH);
1826                         }
1827                         if ((command->hash.length > 0) &&
1828                             !silent_flag) {
1829                                 (void) printf("%s\n", command->string_mb);
1830                         }
1831                         result = dosys(command,
1832                                        ignore,
1833                                        false,
1834                                        false, /* bugs #4085164 & #4990057 */
1835                                        /* BOOLEAN(silent_flag && ignore), */
1836                                        always_exec, 
1837                                        (Name) NULL);

1838                         if (result == build_failed) {
1839                                 if (silent_flag) {
1840                                         (void) printf(catgets(catd, 1, 152, "The following command caused the error:\n%s\n"), command->string_mb);
1841                                 }
1842                                 if (!ignore) {
1843                                         _exit(1);
1844                                 }
1845                         }
1846                 }
1847                 _exit(0);
1848                 break;
1849         default:
1850                 break;
1851         }
1852         return childPid;
1853 }
1854 
1855 static void
1856 maybe_reread_make_state(void)
1857 {