Changeset 35 for trunk/src/kmk/compat.c
- Timestamp:
- Mar 18, 2003, 4:58:49 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/compat.c
r27 r35 66 66 #include <sys/wait.h> 67 67 #endif 68 #if defined(__EMX__) 69 #include <sys/process.h> 70 #endif 71 #if defined(OS2) && defined(__IBMC__) 72 #include <process.h> 73 #endif 68 74 #include <ctype.h> 69 75 #include <errno.h> … … 134 140 135 141 } 142 #if !(defined(OS2) && defined(__IBMC__)) 136 143 if (signo == SIGQUIT) 137 144 exit(signo); 145 #endif 138 146 (void) signal(signo, SIG_DFL); 139 147 (void) kill(getpid(), signo); … … 228 236 229 237 if (*cmdStart == '\0') { 230 free(cmdStart);238 efree(cmdStart); 231 239 Error("%s expands to empty string", cmd); 232 240 return(0); … … 329 337 * Fork and execute the single command. If the fork fails, we abort. 330 338 */ 339 #ifdef OS2 //@todo use klib later! 340 cpid = _spawnvp(P_NOWAIT, av[0], av); 341 #else 331 342 cpid = vfork(); 332 343 if (cpid < 0) { … … 345 356 exit(1); 346 357 } 358 #endif 347 359 348 360 /* 349 361 * we need to print out the command associated with this Gnode in 350 362 * Targ_PrintCmd from Targ_PrintGraph when debugging at level g2, 351 * in main(), Fatal() and DieHorribly(), therefore do not free it363 * in main(), Fatal() and DieHorribly(), therefore do not efree it 352 364 * when debugging. 353 365 */ 354 366 if (!DEBUG(GRAPH2)) { 355 free(cmdStart);367 efree(cmdStart); 356 368 Lst_Replace (cmdNode, cmdp); 357 369 } … … 664 676 signal(SIGTERM, CompatInterrupt); 665 677 } 678 #if !(defined(OS2) && defined(__IBMC__)) 666 679 if (signal(SIGHUP, SIG_IGN) != SIG_IGN) { 667 680 signal(SIGHUP, CompatInterrupt); 668 681 } 682 #endif 683 #if !(defined(OS2) && defined(__IBMC__)) 669 684 if (signal(SIGQUIT, SIG_IGN) != SIG_IGN) { 670 685 signal(SIGQUIT, CompatInterrupt); 671 686 } 687 #endif 672 688 673 689 for (cp = "#=|^(){};&<>*?[]:$`\\\n"; *cp != '\0'; cp++) {
Note:
See TracChangeset
for help on using the changeset viewer.