- Timestamp:
- Aug 22, 2005, 5:50:15 AM (20 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/ChangeLog.LIBC
-
Property cvs2svn:cvs-rev
changed from
1.125
to1.126
r2301 r2302 8 8 The old defaults were 8MB (emxbind) and 8KB (emxomfld). 9 9 - libc: 10 o Added __libc_Back_gfProcessHandleHashBangScripts and 11 __libc_Back_gfProcessHandlePCBatchScripts for use in shells which 12 can handle such scripts more efficiently than libc. 13 o Fixed some bugs related to finding the interpreter in the spawn/exec backend. 10 14 o Merged the signal semaphore handling into the safe sems and 11 15 made signals use them instead. -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/backend.h
-
Property cvs2svn:cvs-rev
changed from
1.32
to1.33
r2301 r2302 905 905 int __libc_Back_processSetPriority(int iWhich, id_t idWho, int iPrio); 906 906 907 908 /** When this flag is set, the exec / spawn backend will handle hash bang scripts. */ 909 extern int __libc_Back_gfProcessHandleHashBangScripts; 910 /** When this flag is set, the exec / spawn backend will handle PC batch scripts. */ 911 extern int __libc_Back_gfProcessHandlePCBatchScripts; 907 912 908 913 /** @} */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc.def
-
Property cvs2svn:cvs-rev
changed from
1.136
to1.137
r2301 r2302 1944 1944 "___libc_LogErrorLeave" @1942 1945 1945 "__memcpy_amd" @1943 1946 "___libc_Back_gfProcessHandleHashBangScripts" @1944 1947 "___libc_Back_gfProcessHandlePCBatchScripts" @1945 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__spawnve.c
-
Property cvs2svn:cvs-rev
changed from
1.19
to1.20
r2301 r2302 18 18 #include <emx/syscalls.h> 19 19 #include <InnoTekLIBC/sharedpm.h> 20 #include <InnoTekLIBC/backend.h> 20 21 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_PROCESS 21 22 #include <InnoTekLIBC/logstrict.h> 22 23 #include "syscalls.h" 24 25 26 /******************************************************************************* 27 * Global Variables * 28 *******************************************************************************/ 29 /** When this flag is set, the exec / spawn backend will handle hash bang scripts. */ 30 int __libc_Back_gfProcessHandleHashBangScripts = 1; 31 /** When this flag is set, the exec / spawn backend will handle PC batch scripts. */ 32 int __libc_Back_gfProcessHandlePCBatchScripts = 1; 23 33 24 34 … … 302 312 const char *pszInterpreter = NULL; 303 313 const char *pszInterpreterArgs = NULL; 304 psz = _getext(pszPgmName); 305 if (psz && (!stricmp(psz, ".cmd") || !stricmp(psz, ".bat") || !stricmp(psz, ".btm"))) 314 if ( __libc_Back_gfProcessHandlePCBatchScripts 315 && (psz = _getext(pszPgmName)) 316 && (!stricmp(psz, ".cmd") || !stricmp(psz, ".bat") || !stricmp(psz, ".btm"))) 306 317 { 307 318 pszInterpreterArgs = "/C"; … … 319 330 *psz++ = '\\'; 320 331 } 321 else 332 else if (__libc_Back_gfProcessHandleHashBangScripts) 322 333 { 323 334 /* … … 353 364 if (*psz++ == '#') 354 365 { 355 while ((ch = *psz) == ' ' &&ch == '\t')366 while ((ch = *psz) == ' ' || ch == '\t') 356 367 psz++; 357 368 if (*psz++ == '!') 358 369 { 359 while ((ch = *psz) == ' ' &&ch == '\t')370 while ((ch = *psz) == ' ' || ch == '\t') 360 371 psz++; 361 372 pszInterpreter = psz; … … 370 381 { 371 382 *psz++ = '\0'; 372 while ((ch = *psz) == ' ' &&ch == '\t')383 while ((ch = *psz) == ' ' || ch == '\t') 373 384 psz++; 374 385 if (ch) … … 420 431 * If the specified name fails, we'll try search the path for it and 421 432 * also adding an .exe extension before we give up. 433 * We omit any specified path since we're frequently faced with path 434 * differences between OS/2 and the UNIX where the script originated. 422 435 */ 423 436 rc = __libc_back_fsResolve(pszInterpreter, BACKFS_FLAGS_RESOLVE_FULL, &szNativePath[0], NULL); 424 437 if (rc) 425 438 { 439 psz = _getname(pszInterpreter); 426 440 char szPath[512]; 427 _searchenv(psz Interpreter, "PATH", szPath); /** @todo _searchenv is not safe, it can easily overflow szPath! */441 _searchenv(psz, "PATH", szPath); /** @todo _searchenv is not safe, it can easily overflow szPath! */ 428 442 if (!szPath[0]) 429 443 { 430 cch = strlen(psz Interpreter);431 memcpy(szNativePath, psz Interpreter, cch + 1);444 cch = strlen(psz); 445 memcpy(szNativePath, psz, cch + 1); 432 446 _defext(szNativePath, "exe"); 433 447 if (szNativePath[cch]) … … 437 451 rc = __libc_back_fsResolve(szPath, BACKFS_FLAGS_RESOLVE_FULL, &szNativePath[0], NULL); 438 452 if (rc) 453 { 454 LIBCLOG_MSG("Failed to find interpreter '%s'! szPath='%s'\n", pszInterpreter, szPath); 439 455 break; 456 } 440 457 } 441 458 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.