Changeset 3159 for trunk/src/kmk/kmkbuiltin
- Timestamp:
- Mar 19, 2018, 2:37:13 PM (8 years ago)
- Location:
- trunk/src/kmk/kmkbuiltin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kmkbuiltin/append.c
r3141 r3159 190 190 191 191 /* 192 * Open the output file .192 * Open the output file, preferrably with close-on-exec. 193 193 */ 194 194 iFile = i; 195 pFile = fopen(argv[i], fTruncate ? "w" : "a"); 195 pFile = fopen(argv[i], 196 fTruncate ? "w" KMK_FOPEN_NO_INHERIT_MODE 197 : "a" KMK_FOPEN_NO_INHERIT_MODE); 196 198 if (!pFile) 197 199 return err(1, "failed to open '%s'", argv[i]); -
trunk/src/kmk/kmkbuiltin/kDepIDB.c
r2955 r3159 732 732 pOutput = stdout; 733 733 else 734 pOutput = fopen(pszOutput, "w" );734 pOutput = fopen(pszOutput, "w" KMK_FOPEN_NO_INHERIT_MODE); 735 735 if (!pOutput) 736 736 { … … 812 812 else 813 813 { 814 pInput = fopen(argv[i], "rb" );814 pInput = fopen(argv[i], "rb" KMK_FOPEN_NO_INHERIT_MODE); 815 815 if (!pInput) 816 816 { -
trunk/src/kmk/kmkbuiltin/md5sum.c
r3131 r3159 156 156 157 157 errno = 0; 158 pFile = fopen(pszFilename, fText ? "r" : "rb"); 158 pFile = fopen(pszFilename, 159 fText ? "r" KMK_FOPEN_NO_INHERIT_MODE 160 : "rb" KMK_FOPEN_NO_INHERIT_MODE); 159 161 if (!pFile && errno == EINVAL && !fText) 160 pFile = fopen(pszFilename, "r" );162 pFile = fopen(pszFilename, "r" KMK_FOPEN_NO_INHERIT_MODE); 161 163 return pFile; 162 164 … … 472 474 * Try open the md5.lst file and process it line by line. 473 475 */ 474 pFile = fopen(pszFilename, "r" );476 pFile = fopen(pszFilename, "r" KMK_FOPEN_NO_INHERIT_MODE); 475 477 if (pFile) 476 478 { … … 837 839 if (pOutput) 838 840 fclose(pOutput); 839 pOutput = fopen(pszOutput, "w" );841 pOutput = fopen(pszOutput, "w" KMK_FOPEN_NO_INHERIT_MODE); 840 842 if (!pOutput) 841 843 { 842 rc = err(1, "fopen(\"%s\", \"w \") failed", pszOutput);844 rc = err(1, "fopen(\"%s\", \"w" KMK_FOPEN_NO_INHERIT_MODE "\") failed", pszOutput); 843 845 break; 844 846 } -
trunk/src/kmk/kmkbuiltin/redirect.c
r3156 r3159 878 878 */ 879 879 FILE *pWorkingStdErr = NULL; 880 # if defined(CONFIG_NEW_WIN_CHILDREN) && defined(KMK) 881 if (cOrders > 0) 882 MkWinChildExclusiveAcquire(); 883 # endif 880 884 rcExit = kRedirectExecFdOrders(cOrders, paOrders, &pWorkingStdErr); 881 885 if (rcExit == 0) … … 890 894 HANDLE hProcess = (HANDLE)_spawnvpe(_P_NOWAIT, pszExecutable, papszArgs, papszEnvVars); 891 895 kRedirectRestoreFdOrders(cOrders, paOrders, &pWorkingStdErr); 896 # ifdef CONFIG_NEW_WIN_CHILDREN 897 if (cOrders > 0) 898 MkWinChildExclusiveRelease(); 899 # endif 892 900 if ((intptr_t)hProcess != -1) 893 901 { … … 1015 1023 #endif /* !KMK */ 1016 1024 } 1025 #if defined(CONFIG_NEW_WIN_CHILDREN) && defined(KBUILD_OS_WINDOWS) && defined(KMK) 1026 else if (cOrders > 0) 1027 MkWinChildExclusiveRelease(); 1028 #endif 1029 1017 1030 } 1018 1031
Note:
See TracChangeset
for help on using the changeset viewer.
