Difference between revisions of "User:Jamesboston/nsIProcess"

From CDOT Wiki
Jump to: navigation, search
(News and Progress)
Line 55: Line 55:
[https://bugzilla.mozilla.org/show_bug.cgi?id=484246 Mar 19, 2009]: Filed a new enhancement bug that ties together the various features in the next stage of development.
[https://bugzilla.mozilla.org/show_bug.cgi?id=484246 Mar 19, 2009]: Filed a new enhancement bug that ties together the various features in the next stage of development.
[http://socghop.appspot.com/student_project/show/google/gsoc2009/mozilla/t124022728175 April 20, 2009]: Projected accepted for Google Summer of Code.
<del>[http://bitbucket.org/james_boston/process-manager/ April 26, 2009]: Created mercurial repository to hold extension used to stage code.</del>
[http://hg.jamesboston.ca/mozilla/gsoc May 8, 2009]: Setup mercurial server to publish code. Mirrors mozilla-central.

Revision as of 15:06, 24 November 2009

Name of Project



Replace the existing nsIProcess interface with new interface that:

  • supports Unicode on all platforms
  • supports piping to and from processes
  • can handle asynchronous I/O via callbacks
  • is available through Components.utils.import("resource://gre/process.js") or a similar JS module approach.



James Boston


Steve Lee


Mark Finkle, Benjamin Smedberg, Ted Mielczarek, Jason Orendorff, David Humphrey

News and updates


All posts are tagged 'nsIProcess':

Or an RSS feed of the same:

News and Progress

(Click dates for attachments or info)

Sept 21, 2008: A first draft (an alpha version really) of the API is posted.

Sept 22, 2008: Released an updated version of an extension that serves as a temporary work around for nsIProcess bugs.

Sept 25, 2008: Submitted patch to bugzilla.

Oct 3, 2008: Submitted revised patch to bugzilla.

Oct 12, 2008: Opened a bug on NSPR lack of unicode support for Unicode arguments.

Nov 11, 2008: Submitted a new patch to bugzilla with Unicode support for Windows.

Nov 23, 2008: Submitted a new patch to bugzilla with isRunning() method.

Jan 25, 2009: Submitted a new patch with unit tests.

Mar 5, 2009: Submitted a new patch with minor revisions. The bug has now also been marked blocking‑fennec.

Mar 9, 2009: Changed interface to return void on run.

Mar 12, 2009: Patch pushed to mozilla-central. (Followed by a minor bustage fix.)

Mar 19, 2009: Filed a new enhancement bug that ties together the various features in the next stage of development.


The code will be done in trunk. To get changeset:

hg pull http://hg.jamesboston.ca/mozilla/gsoc

Or to generate a plain text patch file containing all deviations from trunk visit:


The API for nsIProcess is not fully implemented. At present, the PID of a created process is not retained and cannot be killed. The API would also benifit from a new spec that includes inter-process communication.

An example of an API that for creating processes and communicating with them through STDIN/STDOUT is the Python subprocess module: http://docs.python.org/lib/node528.html

The goal of this project is to create a similar API for Mozilla.

API proposal


Existing API

Code snippet of how to use the existing API

Existing Code


Relevant bugs

Implement a replacement for nsIProcess

nsIProcess.kill() does not work on Win32

Implement inter-process communication (IPC) in Mozilla

PR_CreateProcess in NSPR needs unicode support

Submitted patches

Bug 442393 patches: Patches submitted to fix Bug 442393 - nsIProcess.kill() does not work on Win32

Meetings (Chronological)

Sept 19, 2008: Discussion with Benjamin Smedberg and David Humphrey to discuss the new API proposal.

Sept 22, 2008: Discussion with Mark Finkle and David Humphrey about the API design.

Sept 23, 2008: Discussion with Mark Finkle about using NSPR.

Oct 8, 2008: Discussion about string types and Windows paths in NSPR.

Oct 29, 2008: Advice regarding PRProcess type.

Nov 5, 2008: Getting advice on callbacks across XPConnect divide.

Nov 7, 2008: Round table on Unicode support.

Nov 23, 2008: Discussion about pathnames in xpcshell.