Changeset 600 for trunk/src/corelib
- Timestamp:
- Feb 24, 2010, 10:26:07 PM (15 years ago)
- Location:
- trunk/src/corelib/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/io/qprocess.cpp
r561 r600 2132 2132 The started process will run as a regular standalone process. 2133 2133 2134 2135 2136 2137 2134 2138 The process will be started in the directory \a workingDirectory. 2135 2139 2136 2140 If the function is successful then *\a pid is set to the process 2137 2141 identifier of the started process. 2142 2143 2144 2138 2145 */ 2139 2146 bool QProcess::startDetached(const QString &program, -
trunk/src/corelib/io/qprocess_os2.cpp
r583 r600 53 53 #include <qthread.h> 54 54 55 56 57 58 55 59 /* 56 60 Returns a human readable representation of the first \a len … … 941 945 // @todo use P_SESSION once it's implemented in kLIBC! 942 946 // @todo check if FS VIO apps need a proxy 943 programReal = getenv("COMSPEC"); // returns static!947 programReal = getenv("COMSPEC"); // returns static! 944 948 if (programReal == 0) 945 949 programReal = "cmd.exe"; … … 984 988 args.prepend(programReal); 985 989 args.prepend("/C \""); 986 programReal = getenv("COMSPEC"); // returns static!990 programReal = getenv("COMSPEC"); // returns static! 987 991 if (programReal == 0) 988 992 programReal = "cmd.exe"; … … 993 997 for (char **e = envv; *e; ++e) 994 998 env += *e + '\0'; 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 995 1017 996 1018 STARTDATA data; … … 1000 1022 data.TraceOpt = SSF_TRACEOPT_NONE; 1001 1023 data.PgmTitle = 0; 1002 data.PgmName = (PSZ)programReal;1003 data.PgmInputs = args .data();1024 data.PgmName = ; 1025 data.PgmInputs = args; 1004 1026 data.TermQ = 0; 1005 data.Environment = env .isEmpty() ? 0 : env.data();1027 data.Environment = env; 1006 1028 data.InheritOpt = SSF_INHERTOPT_PARENT; 1007 1029 data.SessionType = SSF_TYPE_DEFAULT; … … 1014 1036 data.ObjectBuffLen = 0; 1015 1037 1016 ULONG ulSid, ulPid; 1017 if (DosStartSession(&data, &ulSid, &ulPid) == NO_ERROR) 1018 pid = ulPid; 1038 ULONG ulSid, ulPidDummy; 1039 arc = DosStartSession(&data, &ulSid, &ulPidDummy); 1040 #if defined(QPROCESS_DEBUG) 1041 qDebug("qt_startProcess: DosStartSession() returned %ld", arc); 1042 #endif 1043 // Note: for SSF_RELATED_INDEPENDENT, PID of the started process is 1044 // unknown, return 0 to indicate this 1045 if (arc == NO_ERROR) 1046 pid = 0; 1047 else 1048 pid = -1; 1049 1050 #if defined(__INNOTEK_LIBC__) 1051 if (envLow) 1052 ::free(envLow); 1053 ::free(argsLow); 1054 ::free(pgmNameLow); 1055 #endif 1019 1056 } else { 1020 1057 pid = spawnve(mode, programReal, const_cast<char * const *>(argvReal), envv);
Note:
See TracChangeset
for help on using the changeset viewer.