Open main menu

CDOT Wiki β

Changes

User:Jamesboston/nsIProcess

2,712 bytes removed, 14:23, 18 May 2009
Proposed patches
==Proposed patches==
[http://jamesboston.ca/patches/patch092408.txt <del>patch092408.txt</del>]: This patch fixes the kill() method by putting an attribute into the class that is a Win32 defined struct for holding a reference to a process, and then using that reference to terminate the process. This approach is not considered optimal because it adds more code complexity. [http://jamesboston.ca/patches/patch092508.txt <del>patch092508.txt</del>]: This patch removes Window's specific code from the implementation. Instead, Windows and all other platforms use the Netscape Portable Runtime (NSPR) to create processes. Additionally, the logic for blocking is modified. For non-blocking processes, the code previously invoked logic in the NSPR that detached a process and deleted the reference to it, rendering the kill() function useless. This has been changed so that the kill() function works unmodified. However, it looks as the the NSPR does not support OS X process creation/termination. (In fact, the remaining Mac specific code in nsProcessCommon.cpp may not actually do anything.) Additional implementation may be necessary in the NSPR. [http://jamesboston.ca/patches/patch100308.txt <del>patch100308.txt</del>]: Removed the Mac code. The NSPR seems to do everything necessary. The destructor has also been coded to detach a process if it hasn't been killed yet. [http://jamesboston.ca/patches/patch102208.txt <del>patch102208.txt</del>]: Implemented returning the PID for Windows. Added some code to clean up memory after kill is used, but haven't verified that it works. [http://jamesboston.ca/patches/patch102808.txt <del>patch102808.txt</del>]: Implemented returning the PID for Mac and Linux. Solution assumes too much about structure of PRProcess. [http://jamesboston.ca/patches/patch111108.txt patch111108.txt]: No longer trying to use NSPR for process management. Unicode support added. Run/Kill is Windows only. [http://jamesboston.ca/patches/patch112308.txt <del>patch112308.txt</del>]: A more conservative patch that leaves much of the Windows specific code in tact, but solves the problem of kill() working and returning a PID. Also, adds an isRunning() method. [http://jamesboston.ca/patches/patch112508.txt <del>patch112508.txt</del>]: Updates the previous patch to fix a problem with returning PIDs on Mac. [http://jamesboston.net/patches/patch112808.txt <del>patch112808.txt</del>]: Add unit tests for all platforms, but the test fails on Mac. [https://bugzilla.mozilla.org/attachment.cgi?idbugid=358763 <del>358763</del>]: Unit test passes on all platforms. [https://bug442393.bugzilla.mozilla.org/attachment.cgi?id442393&action=365651 <del>365651</del>viewall Bug 442393 patches]: Minor ammendments suggested by reviewer. [https://bug442393.bugzilla.mozilla.org/attachment.cgi?id=366315 366315]: Change run Patches submitted to a void return. [https://bug442393.bugzilla.mozilla.org/attachment.cgi?id=366354 336354]: Bustage fixBug 442393 - nsIProcess.kill() does not work on Win32
==Meetings (Chronological)==