Closed
Bug 551375
Opened 14 years ago
Closed 14 years ago
_PR_CreateWindowsProcess function is broken on WinCE
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: alexp, Assigned: alexp)
Details
Attachments
(1 file, 2 obsolete files)
7.94 KB,
patch
|
blassey
:
review+
|
Details | Diff | Splinter Review |
CreateProcessW() API function on WinCE requires pszImageName parameter and the arguments in pszCmdLine.
Assignee | ||
Updated•14 years ago
|
Assignee: wtc → alexp
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•14 years ago
|
||
- assembleEnvBlock is not used for WinCE - Pass the executable and arguments separately to CreateProcessW
Attachment #431550 -
Flags: review?(bugmail)
Assignee | ||
Comment 2•14 years ago
|
||
- Added path expansion using _wfullpath if a relative path to executable is provided (as WinCE does not support relative paths). - Added a small fix for parent.c test, which verifies PR_CreateProcess() function.
Attachment #431550 -
Attachment is obsolete: true
Attachment #431750 -
Flags: superreview?
Attachment #431750 -
Flags: review?(bugmail)
Attachment #431550 -
Flags: review?(bugmail)
Assignee | ||
Updated•14 years ago
|
Attachment #431750 -
Flags: superreview? → superreview?(wtc)
Comment 3•14 years ago
|
||
Comment on attachment 431750 [details] [diff] [review] Fix v2 >+ if (wideArgv0[0] == L'\\') >+ wideExe = wideArgv0; >+ else { >+ /* Relative path is not supported by WinCE, so get an absolute path */ >+ wideAbsPath = PR_MALLOC(MAX_PATH * sizeof(PRUnichar)); >+ wideExe = _wfullpath(wideAbsPath, wideArgv0, MAX_PATH); >+ } I think this would be cleaner written like this: if (wideArgv0[0] != L'\\' && wideArgv0[0] != L'/'){ PRUnichar tmp = wideArgv0; wideArgv0 = PR_MALLOC(MAX_PATH * sizeof(PRUnichar)); _wfullpath(wideArgv0, tmp, MAX_PATH); PR_FREE(tmp); } You can then drop wideAbsPath and wideExe and just use wideArgv0 for the rest of the function. Also, we accept both forward and back slashes in most of our path operations, no need to exclude forward slashes here. everything else looks good, going to r- though because I'd like to see a patch with that change
Updated•14 years ago
|
Attachment #431750 -
Flags: review?(bugmail) → review-
Assignee | ||
Comment 4•14 years ago
|
||
Agree with Brad - this way it's cleaner, and we can accept "/" too as CreateProcessW supports paths with forward slashes as well. Also now executing the binary provided in the path parameter, not argv[0]. This makes more sense and seems to be more consistent with implementation for other systems. Wan-Teh, what do you think about this bit?
Attachment #431750 -
Attachment is obsolete: true
Attachment #431972 -
Flags: superreview?(wtc)
Attachment #431972 -
Flags: review?(bugmail)
Attachment #431750 -
Flags: superreview?(wtc)
Comment 5•14 years ago
|
||
Comment on attachment 431972 [details] [diff] [review] Fix v3 looks good, but I defer to Wan-Teh on the path/argv[0] bit
Attachment #431972 -
Flags: review?(bugmail) → review+
Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•