儲存庫 kBuild 的更動 3053
- 時間撮記:
- 2017-8-31 下午03:18:36 (7 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/kmk/kmkbuiltin/redirect.c
r3039 r3053 640 640 #ifndef KBUILD_OS_WINDOWS 641 641 else 642 fprintf(*ppWorkingStdErr, "%s: dup2(%d,%d) failed: %s ",642 fprintf(*ppWorkingStdErr, "%s: dup2(%d,%d) failed: %s\n", 643 643 g_progname, paOrders[i].fdSaved, paOrders[i].fdTarget, strerror(errno)); 644 644 #endif … … 648 648 if (paOrders[i].fSaved != -1) 649 649 { 650 if (fcntl(paOrders[i].fdTarget, F_SETFD, paOrders[i].fSaved & FD_CLOEXEC) == -1)650 if (fcntl(paOrders[i].fdTarget, F_SETFD, paOrders[i].fSaved & FD_CLOEXEC) != -1) 651 651 paOrders[i].fSaved = -1; 652 652 else 653 fprintf(*ppWorkingStdErr, "%s: fcntl(%d,F_SETFD,%s) failed: %s ",653 fprintf(*ppWorkingStdErr, "%s: fcntl(%d,F_SETFD,%s) failed: %s\n", 654 654 g_progname, paOrders[i].fdTarget, paOrders[i].fSaved & FD_CLOEXEC ? "FD_CLOEXEC" : "0", strerror(errno)); 655 655 } … … 703 703 rcExit = 0; 704 704 else 705 fprintf(*ppWorkingStdErr, "%s: fcntl(%d,F_SETFD,FD_CLOEXEC) failed: %s ",705 fprintf(*ppWorkingStdErr, "%s: fcntl(%d,F_SETFD,FD_CLOEXEC) failed: %s\n", 706 706 g_progname, fdTarget, strerror(errno)); 707 707 } … … 709 709 rcExit = 0; 710 710 else 711 fprintf(*ppWorkingStdErr, "%s: fcntl(%d,F_GETFD,0) failed: %s ", g_progname, fdTarget, strerror(errno));711 fprintf(*ppWorkingStdErr, "%s: fcntl(%d,F_GETFD,0) failed: %s\n", g_progname, fdTarget, strerror(errno)); 712 712 } 713 713 # endif … … 727 727 { 728 728 if (paOrders[i].enmOrder == kRedirectOrder_Open) 729 fprintf(*ppWorkingStdErr, "%s: dup2(%d [%s],%d) failed: %s ", g_progname, paOrders[i].fdSource,729 fprintf(*ppWorkingStdErr, "%s: dup2(%d [%s],%d) failed: %s\n", g_progname, paOrders[i].fdSource, 730 730 paOrders[i].pszFilename, paOrders[i].fdTarget, strerror(errno)); 731 731 else 732 fprintf(*ppWorkingStdErr, "%s: dup2(%d,%d) failed: %s ",732 fprintf(*ppWorkingStdErr, "%s: dup2(%d,%d) failed: %s\n", 733 733 g_progname, paOrders[i].fdSource, paOrders[i].fdTarget, strerror(errno)); 734 734 rcExit = 10; … … 900 900 901 901 # elif defined(KBUILD_OS_OS2) 902 *pPidSpawned = _spawnv e(_P_NOWAIT, pszExecutable, papszArgs, papszEnvVars);902 *pPidSpawned = _spawnvpe(P_NOWAIT, pszExecutable, papszArgs, papszEnvVars); 903 903 kRedirectRestoreFdOrders(cOrders, paOrders, &pWorkingStdErr); 904 904 if (*pPidSpawned != -1) … … 932 932 # if defined(KBUILD_OS_WINDOWS) || defined(KBUILD_OS_OS2) 933 933 errno = 0; 934 # if defined(KBUILD_OS_WINDOWS) 934 935 rcExit = (int)_spawnvpe(_P_WAIT, pszExecutable, papszArgs, papszEnvVars); 936 # else 937 rcExit = (int)_spawnvpe(P_WAIT, pszExecutable, papszArgs, papszEnvVars); 938 # endif 935 939 kRedirectRestoreFdOrders(cOrders, paOrders, &pWorkingStdErr); 936 940 if (rcExit != -1 || errno == 0) … … 1223 1227 { 1224 1228 /* The max length is supposed to be 1024 bytes. */ 1225 apszSavedLibPaths[ulVar] = calloc(1024 *2);1229 apszSavedLibPaths[ulVar] = calloc(1024, 2); 1226 1230 if (apszSavedLibPaths[ulVar]) 1227 1231 { … … 1677 1681 warnx("DosSetExtLIBPATH('%s',%u) failed with %u when restoring the original values!", 1678 1682 apszSavedLibPaths[ulLibPath], ulLibPath, rc); 1679 free(apszSavedLibPaths[ulLibPath]) 1683 free(apszSavedLibPaths[ulLibPath]); 1680 1684 } 1681 1685 #endif
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器